From patchwork Wed Feb 15 19:45:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 57691 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp383870wrn; Wed, 15 Feb 2023 11:47:13 -0800 (PST) X-Google-Smtp-Source: AK7set80rX7mQ1gDOxOVkUqFGpzCMiksehku3NP1fG6FDybBycHDYgtWXJZYOGH4Z9Hb314BWQ6w X-Received: by 2002:a17:902:e80d:b0:19a:c65d:fa0 with SMTP id u13-20020a170902e80d00b0019ac65d0fa0mr4281209plg.55.1676490432922; Wed, 15 Feb 2023 11:47:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676490432; cv=none; d=google.com; s=arc-20160816; b=sGOoaeH85SIauu1UXQcI8baKLbJvQQTxjYl+/qnmnB6DIcyf6IQbry7+PjGO0+Yml0 J6yZqiUGP7e5VZKlfw+0OIt56Z4n/U2l1iNIZZ47qMbSmR1ImbnrZcwQ8qZME5DME5sG 8RqWA1sU3wnAM/y/4nx6cwQZe+kTL8QwlaNR64sgrkxkPFfy67/bF4SpqzJbQ9q3T/Vp nPx1bRpVzOWNxPcbldrrBuCL5yuynoFt55Eq7fTdttLXmGjyN0IijViWeVM1ib+Vq2QO YkD4J28lu24f/kOMrPHmhPNDo27WeyJ09eBr2uAqOt6rIl8e4FRRW6X97jjnDvxhRNuW +Vww== 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=Trt2ZQL6yNG7anvG9ctfIK452R/Im0QyhGrBzudu7FHgM4OPQla2n7yZ14e+XTt4wR cfMbRH3Y77KmfVjlNyO0tvoZ23EnL9Dz8J9ry28hg8m49XhtzxJ6NzY4W1NA3Y8GFASQ mmakoC5383X+QinjEPVVDRyeBAYlNeFrYfbJfdTixWtm4Fci6TlXhRit36cP4bYjVwUr nJk7GKqXv/kVxZDrGvxGhtsa6dsYyR6SJwc2sIvLS6sC9sXsOxm1XTC5+MJXAdX54OSF jqcL4nZZlT/0JwpjFkY2voo23CyQ72MBHivqZLY+Z8+ajI+Jw5TtPm0dzHVeeAT4kyKl wxEA== 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 k4-20020a170902694400b0019a730571dfsi14349837plt.394.2023.02.15.11.47.00; Wed, 15 Feb 2023 11:47:12 -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 S229736AbjBOTqf (ORCPT + 99 others); Wed, 15 Feb 2023 14:46:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbjBOTqT (ORCPT ); Wed, 15 Feb 2023 14:46:19 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CA6E410A0; Wed, 15 Feb 2023 11:46:11 -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 46D7B7A05F3; Wed, 15 Feb 2023 20:46:04 +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: Wed, 15 Feb 2023 20:45:42 +0100 Message-Id: <20230215194554.25632-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230215194554.25632-1-linux@zary.sk> References: <20230215194554.25632-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?1757927632046372984?= X-GMAIL-MSGID: =?utf-8?q?1757927632046372984?= 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 Reviewed-by: Sergey Shtylyov --- 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 */