From patchwork Mon Mar 6 17:27:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65025 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1993119wrd; Mon, 6 Mar 2023 10:08:42 -0800 (PST) X-Google-Smtp-Source: AK7set++X8UPHcfBh3ej0lCJQB2H7pK+MwbtPWOi8NBtKsgVXtpYJ04gktV6ms6yleCc58Rx5nPt X-Received: by 2002:a62:1ad4:0:b0:5a8:d407:60f9 with SMTP id a203-20020a621ad4000000b005a8d40760f9mr8900817pfa.29.1678126122236; Mon, 06 Mar 2023 10:08:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678126122; cv=none; d=google.com; s=arc-20160816; b=PgRwHIzRHmTvfh9sX/c1kZAbMIQ+n2EdIWK16ny0fSPLFp0UgpwSjXrVwsan4Ac4yC 9qm/kYV36sUWfSqClw61DWSOGJKAnhP2rdQxoomXvx8i/3dh/DEjgXYtnk0ypBtDJmMc NFiQ72zxn73w5rd4hK9nqWdUcYHeJ+UUfE+SkA9ev4YT9FG0HzdgPz0rLOxOBmoiN+p9 J0slutxx7GqoPdC/eu4YBkTlkL2K43g+p5Mlf22Lqt/uWOhM5EUUAbswVIxJcqjWCeKv xAjF9jo5VJcHU2xF45DaGo88kzb2PzBJr2n/RBalhPnXWhir3VHyC8KQNdRQ17RBVcKG Sdxg== 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=knqw/dmPDZmaHq3kQSgsCXffTxzVe8wKBH0yClN1SBOijGy2AKp6c4IT7f5bzX0NHG 20xdsHvC3p1LDwGdpi0uc9Bomh8OTyNAcRFy2bxrw4QLfBXtIj2p2Hn++iKYvURoyEoU bts+7UI193ldfOXkZhaOdMl4lBrYP/24aceFxtf7swWfjEZM8T9Sq74eG+Zf+panLQ1H jEJLN4bh4RYpzAJwQaeAzJbjzt8u1ZEbzkZZv0Kb1D1fn3iHbapBb7JkQlqE7+c43pbS oetKTIVXr6BjccsdLVeubkMi+p29wc68LBYpoS3EodZg76gk1AZa2xh4l7ULlNzDWURV XMzQ== 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 x20-20020aa79414000000b0058e16d0b827si10494707pfo.32.2023.03.06.10.08.29; Mon, 06 Mar 2023 10:08:42 -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 S230472AbjCFR4J (ORCPT + 99 others); Mon, 6 Mar 2023 12:56:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230456AbjCFRzr (ORCPT ); Mon, 6 Mar 2023 12:55:47 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 05DBA6512E; Mon, 6 Mar 2023 09:55:15 -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 BB2A57A05D5; Mon, 6 Mar 2023 18:28:28 +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: Mon, 6 Mar 2023 18:27:40 +0100 Message-Id: <20230306172752.7727-7-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230306172752.7727-1-linux@zary.sk> References: <20230306172752.7727-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?1759642776816467257?= X-GMAIL-MSGID: =?utf-8?q?1759642776816467257?= 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 */