From patchwork Tue Feb 14 22:59:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3245221wrn; Tue, 14 Feb 2023 15:01:39 -0800 (PST) X-Google-Smtp-Source: AK7set/OGw8b/I77/7w+YWnF+H/dj01dV2VRFX72drIpVjpZlu9x7GF8WYAf/+ElpcwKX6eIoauy X-Received: by 2002:a17:907:11dd:b0:879:bff:55c with SMTP id va29-20020a17090711dd00b008790bff055cmr160806ejb.1.1676415699763; Tue, 14 Feb 2023 15:01:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676415699; cv=none; d=google.com; s=arc-20160816; b=ASPwtQSNrDqK3lUQDvkjl7tScukTu9FJNxzQc7A+w7fVHWrO1nuF2l8+kVtUSEJlAp BpoDrjIo47XaOqX8dMRThNTAhv/OEn9F1rrzyCuaDqB9A6fCL7s8e6i8Ru/OMZjy9M43 MKs+ExmhfOjOrnVDmzJ2kkLrMPqhlGc2elD51DohIleUBdbPCsrI36H9STsL2b5fv7g/ 3P1oZua9MPQaL/SIxKPTI6uBK7UFRylZw1i6NXi3HqCX6gSMHeXpNaKavDLJISDKoPOk pm+0h5rXG5A9dauM32eMRa9N/c5onZfXTFZpYWFFUwMfbLCZ4DE0CSGGadcYCCR6FmSW JN0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LPK+T+mK5rsIXbeHCKvYS/sdYiS3NMkWiGYJC9DXm5c=; b=yTKtw72oYM2RmrtADM0oZ1eJSCbhR9QFWeN565YF2KloONkenSIg5cNAOnP3WuK7Ba bdIplDmlEoLunoQrivVftS8aF2/NtvwJ7GPAEaDwokv2oAEgXFIWlllWNpyrm4DIQFd1 FobYw8PTXr+3fV/4HXf65j3laY1dyy8GwJwvcYE3tiZbpvRpqaSsPq8Z85I+zGDVtdsO e2YszGK5BrZpnk6sHrHpvALJvLHvLUcderkJOXsjTBPii+sS8/7/SDEl62SHx9p4LtJr TkW73X2cImQPOnt7f5vMJGhvGl2E8YRj0s7CAlHSKMw/aTaOjqe2bqXBngv0793A8y2N WC5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o2-20020aa7c502000000b004acd30eabb3si5335089edq.69.2023.02.14.15.01.08; Tue, 14 Feb 2023 15:01:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232733AbjBNXAm (ORCPT + 99 others); Tue, 14 Feb 2023 18:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232349AbjBNXA1 (ORCPT ); Tue, 14 Feb 2023 18:00:27 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B635298F2; Tue, 14 Feb 2023 15:00:24 -0800 (PST) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id 935FD7A05F3; Wed, 15 Feb 2023 00:00:19 +0100 (CET) From: Ondrej Zary To: Damien Le Moal Cc: Christoph Hellwig , Sergey Shtylyov , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/18] pata_parport: remove devtype from struct pi_adapter Date: Tue, 14 Feb 2023 23:59:58 +0100 Message-Id: <20230214230010.20318-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230214230010.20318-1-linux@zary.sk> References: <20230214230010.20318-1-linux@zary.sk> MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757849268738266517?= X-GMAIL-MSGID: =?utf-8?q?1757849268738266517?= Only bpck driver uses devtype but it never gets set in pata_parport. Remove it. As most bpck devices are CD-ROMs, always run the code that depends on devtype == PI_PCD. Signed-off-by: Ondrej Zary --- drivers/ata/pata_parport/bpck.c | 4 ++-- include/linux/pata_parport.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index b9174cf8863c..96386a10c22f 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -241,14 +241,14 @@ static void bpck_connect ( PIA *pi ) WR(5,8); - if (pi->devtype == PI_PCD) { +/* if (pi->devtype == PI_PCD) { possibly wrong, purpose unknown */ WR(0x46,0x10); /* fiddle with ESS logic ??? */ WR(0x4c,0x38); WR(0x4d,0x88); WR(0x46,0xa0); WR(0x41,0); WR(0x4e,8); - } +/* }*/ } static void bpck_disconnect ( PIA *pi ) diff --git a/include/linux/pata_parport.h b/include/linux/pata_parport.h index 9614ce53470a..3fc6b002c7c8 100644 --- a/include/linux/pata_parport.h +++ b/include/linux/pata_parport.h @@ -11,15 +11,12 @@ #include -#define PI_PCD 1 /* dummy for paride protocol modules */ - struct pi_adapter { struct device dev; struct pi_protocol *proto; /* adapter protocol */ int port; /* base address of parallel port */ int mode; /* transfer mode in use */ int delay; /* adapter delay setting */ - int devtype; /* dummy for paride protocol modules */ char *device; /* dummy for paride protocol modules */ int unit; /* unit number for chained adapters */ int saved_r0; /* saved port state */