Message ID | 20230211144232.15138-4-linux@zary.sk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1522025wrn; Sat, 11 Feb 2023 06:44:07 -0800 (PST) X-Google-Smtp-Source: AK7set/fYSlOrMN5r8gllbNDuIaAONO6A6QPQwLK9Jt0ZzrrJI53G1d7LJrpfzCW9ZZJbL1qogz9 X-Received: by 2002:a17:907:2142:b0:888:7d50:33b4 with SMTP id rk2-20020a170907214200b008887d5033b4mr18236696ejb.34.1676126647615; Sat, 11 Feb 2023 06:44:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676126647; cv=none; d=google.com; s=arc-20160816; b=ObXBmRWXrQDPVXElvgfJOvvp0PiWUVPw1x0zOJFcKWotJ0u5o5N/O/yo0lXAgz+chA r3nd53oLh/bOA3fuczNOgCEQtQ+b5mwPF4q/MKzKfA1pcTGCY+c4HaA/fBY5qYlxJY8e klVyi7egSilH75zpkIuMXnSJyhK6yHGYiQFg547Tl0QVbtFipp/BQbjBmQe+iStLkpjM 80I0u1Q+JfCliXol/5zIxJLiG3FTUmw6ZX4DFaXMytFugEQw5SZz5YEFtjyDk/Hap081 pARilYV9J7eNIQtPyWBNHGxWMnA4BvkreThwO8iW9JvP59kKEn72SP8BUSHXZxN0F/Kx 1DKA== 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=EHVy0+to5bWBpvw1m5y1WYs8MDJjOXA2vwepNkWPdmw=; b=lLhZP/QVVUnEO99XrnlP67Y2hEHTDfW49YAa8Bu/bZVvvihWtEBJPJPJNkxZNvin3Z HYt5OHz3hPonwHrUALsShi8vEEghtjdnYrCLREJOiqCvwu1kTThWM7hGKMzLoFJvSOk+ LU2ASB6rLYvI7NJCAhbQMl+cwWbdwUpjRUYU/Qgvt9R7BEibNM9hxns267p1MxVTqRaD 6aIiGjWGlGnq2IcsJPE5q6buLPJ+GqZ1IPjTA511c/eD1O4u/0QQ4Rrr/mXenjkjCzxi ym/WpR19lnNHgPN/4SnTrO+Gr1TkHrfNhWWo38dlEQSgkThyB/RArabWNSB9i6qgGbJI eUwg== 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 wg15-20020a1709078f0f00b008a9a111ce8dsi7829377ejc.4.2023.02.11.06.43.44; Sat, 11 Feb 2023 06:44:07 -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 S229793AbjBKOmy (ORCPT <rfc822;olliecheer@gmail.com> + 99 others); Sat, 11 Feb 2023 09:42:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjBKOmx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 11 Feb 2023 09:42:53 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id EC38E1F499; Sat, 11 Feb 2023 06:42:50 -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 3F28C7A05AB; Sat, 11 Feb 2023 15:42:49 +0100 (CET) From: Ondrej Zary <linux@zary.sk> To: Damien Le Moal <damien.lemoal@opensource.wdc.com> Cc: Christoph Hellwig <hch@lst.de>, Sergey Shtylyov <s.shtylyov@omp.ru>, Jens Axboe <axboe@kernel.dk>, Tim Waugh <tim@cyberelk.net>, linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/12] pata_parport: remove devtype from struct pi_adapter Date: Sat, 11 Feb 2023 15:42:23 +0100 Message-Id: <20230211144232.15138-4-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230211144232.15138-1-linux@zary.sk> References: <20230211144232.15138-1-linux@zary.sk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757546175749301674?= X-GMAIL-MSGID: =?utf-8?q?1757546175749301674?= |
Series |
pata_parport: protocol drivers cleanups
|
|
Commit Message
Ondrej Zary
Feb. 11, 2023, 2:42 p.m. UTC
Only bpck driver uses devtype but it never gets set in pata_parport.
Remove it.
Signed-off-by: Ondrej Zary <linux@zary.sk>
---
drivers/ata/pata_parport/bpck.c | 2 +-
include/linux/pata_parport.h | 3 ---
2 files changed, 1 insertion(+), 4 deletions(-)
Comments
On 2/11/23 5:42 PM, Ondrej Zary wrote: > Only bpck driver uses devtype but it never gets set in pata_parport. > Remove it. > > Signed-off-by: Ondrej Zary <linux@zary.sk> > --- > drivers/ata/pata_parport/bpck.c | 2 +- > include/linux/pata_parport.h | 3 --- > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c > index b9174cf8863c..451a068fe28a 100644 > --- a/drivers/ata/pata_parport/bpck.c > +++ b/drivers/ata/pata_parport/bpck.c > @@ -241,7 +241,7 @@ static void bpck_connect ( PIA *pi ) > > WR(5,8); > > - if (pi->devtype == PI_PCD) { > + if (1 /*pi->devtype == PI_PCD*/) { /* FIXME */ > WR(0x46,0x10); /* fiddle with ESS logic ??? */ Why not drop this entire *if* stmt? > WR(0x4c,0x38); > WR(0x4d,0x88); [...] MBR, Sergey
On Saturday 11 February 2023 20:11:06 Sergey Shtylyov wrote: > On 2/11/23 5:42 PM, Ondrej Zary wrote: > > > Only bpck driver uses devtype but it never gets set in pata_parport. > > Remove it. > > > > Signed-off-by: Ondrej Zary <linux@zary.sk> > > --- > > drivers/ata/pata_parport/bpck.c | 2 +- > > include/linux/pata_parport.h | 3 --- > > 2 files changed, 1 insertion(+), 4 deletions(-) > > > > diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c > > index b9174cf8863c..451a068fe28a 100644 > > --- a/drivers/ata/pata_parport/bpck.c > > +++ b/drivers/ata/pata_parport/bpck.c > > @@ -241,7 +241,7 @@ static void bpck_connect ( PIA *pi ) > > > > WR(5,8); > > > > - if (pi->devtype == PI_PCD) { > > + if (1 /*pi->devtype == PI_PCD*/) { /* FIXME */ > > WR(0x46,0x10); /* fiddle with ESS logic ??? */ > > Why not drop this entire *if* stmt? I decided to keep it (for now) as a marker of a possible bug. I currently don't have HW to test this driver. > > > WR(0x4c,0x38); > > WR(0x4d,0x88); > [...] > > MBR, Sergey >
On 2/12/23 05:47, Ondrej Zary wrote: > On Saturday 11 February 2023 20:11:06 Sergey Shtylyov wrote: >> On 2/11/23 5:42 PM, Ondrej Zary wrote: >> >>> Only bpck driver uses devtype but it never gets set in pata_parport. >>> Remove it. >>> >>> Signed-off-by: Ondrej Zary <linux@zary.sk> >>> --- >>> drivers/ata/pata_parport/bpck.c | 2 +- >>> include/linux/pata_parport.h | 3 --- >>> 2 files changed, 1 insertion(+), 4 deletions(-) >>> >>> diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c >>> index b9174cf8863c..451a068fe28a 100644 >>> --- a/drivers/ata/pata_parport/bpck.c >>> +++ b/drivers/ata/pata_parport/bpck.c >>> @@ -241,7 +241,7 @@ static void bpck_connect ( PIA *pi ) >>> >>> WR(5,8); >>> >>> - if (pi->devtype == PI_PCD) { >>> + if (1 /*pi->devtype == PI_PCD*/) { /* FIXME */ >>> WR(0x46,0x10); /* fiddle with ESS logic ??? */ >> >> Why not drop this entire *if* stmt? > > I decided to keep it (for now) as a marker of a possible bug. I currently don't have HW to test this driver. Then leave that if as-is and only add a comment detailing what needs to be done (rather than just "FIXME"). This "if (1)" is just too odd and will likely trigger code checker warnings. > >> >>> WR(0x4c,0x38); >>> WR(0x4d,0x88); >> [...] >> >> MBR, Sergey >> > >
diff --git a/drivers/ata/pata_parport/bpck.c b/drivers/ata/pata_parport/bpck.c index b9174cf8863c..451a068fe28a 100644 --- a/drivers/ata/pata_parport/bpck.c +++ b/drivers/ata/pata_parport/bpck.c @@ -241,7 +241,7 @@ static void bpck_connect ( PIA *pi ) WR(5,8); - if (pi->devtype == PI_PCD) { + if (1 /*pi->devtype == PI_PCD*/) { /* FIXME */ WR(0x46,0x10); /* fiddle with ESS logic ??? */ WR(0x4c,0x38); WR(0x4d,0x88); 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 <linux/libata.h> -#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 */