From patchwork Sat Feb 18 22:01:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 59036 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp569604wrn; Sat, 18 Feb 2023 14:04:18 -0800 (PST) X-Google-Smtp-Source: AK7set8a/qv3BtVfHg5lYwb2R5aZkXTre9ZS1aHV0dsWwEdReky3FWVJLC/lkGIjZFNB3XPmX2gV X-Received: by 2002:a17:90a:189:b0:233:d91e:e64a with SMTP id 9-20020a17090a018900b00233d91ee64amr319146pjc.10.1676757857755; Sat, 18 Feb 2023 14:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676757857; cv=none; d=google.com; s=arc-20160816; b=omcV2gD06j58HFbG61o/NhpwES0weDOScuRMsRRdp7X8T8j4RhU4L/sVzU/UFVdgJ/ w9pNjkNEWZOvgwli2DjxxwNMG1fn9wahEnIAY3Ar8UX8qvqbPmKSulr7hPB52BbWxrdc xOlRlwW6jZ0Uc+kp447llW8ZK9fOYiPYKmEws02Pp8cPibrvzyDISZheHvInDsI6BqBk jU5weicP020ZnwRx8uloQTUxlnZmfmebdvbqGusmLQrZ0/EiRdBHUFEQK4FCU1wIJ96L eZM9e0CLfXI1wOFFy+lERQ8c95C1dFzPpEQnP/MSh51+8Nxt7XvvLKbj8aKZZvuB40G0 69xA== 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=v9wsH9RhXo78KJux6d7gE9oHk5zfqcx+fJbAcY+XL4A=; b=gxeZ3HMy/iZ/FTB4+9GV2yZ01RtfXzBkFb1lv+pY8bofTr8euRYxXeTGzo1M3rdcyF rWUWJNnoi8tupGYpxTaV61sZmwX1I6N+2nCO4tf2e1KmaOCJV9DjLvHuZgQ9ro4antSb SRyyBMPnQO1R8dYBmxmUZB39DygnY/S9wmPqOgmaViReKV9chaXvHW9MrI8obVU3uJXc OE5+N08yTJ50KDzzWatp2fJJaXZcTAZyVxLhI76LYmtIGqoXzp8/P8DxEf0++fsFFyQe GlSC/s85UYl0Vylpw+cW6IzO97cT8hwrIftKv9dntcLodeErTMXpeJ8Tmj72H9pi9n0L zW5g== 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 oc17-20020a17090b1c1100b0022bb4d6f7casi11676175pjb.131.2023.02.18.14.04.05; Sat, 18 Feb 2023 14:04:17 -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 S229793AbjBRWCW (ORCPT + 99 others); Sat, 18 Feb 2023 17:02:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229811AbjBRWCK (ORCPT ); Sat, 18 Feb 2023 17:02:10 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 281431285E; Sat, 18 Feb 2023 14:02:08 -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 D06597A05F3; Sat, 18 Feb 2023 23:02:02 +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: Sat, 18 Feb 2023 23:01:26 +0100 Message-Id: <20230218220138.5692-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230218220138.5692-1-linux@zary.sk> References: <20230218220138.5692-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?1758208047211497014?= X-GMAIL-MSGID: =?utf-8?q?1758208047211497014?= 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. Reviewed-by: Sergey Shtylyov 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 */