From patchwork Tue Mar 7 22:46:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65933 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp7830wrd; Tue, 7 Mar 2023 14:58:53 -0800 (PST) X-Google-Smtp-Source: AK7set9emHTwB0oxcy2xTJgklvcWddblysQ+MmydyKiRFSdc87lBoULJ+xUGmxrHbIzxuuoIzV81 X-Received: by 2002:a05:6a20:3c9f:b0:cb:2c7e:b673 with SMTP id b31-20020a056a203c9f00b000cb2c7eb673mr16611026pzj.37.1678229933086; Tue, 07 Mar 2023 14:58:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678229933; cv=none; d=google.com; s=arc-20160816; b=VnDzUmq7mC7ZhmZBbaBvHH9DB5aXeuGY6N2BJNU95ISTINt4pouP6GgcwaltCLcUlk PuXmZ2mW5w92aMX5aicVrkQu6+uU/FMlx4helGobUbQV90MI2n85Kyqy9/3Vp/gcTNWN VoBlgmbMZGf7w7C4qt0mTWqdPGvshp68l4N0WP2SidIyFiS3zBXkfrrQVM+m/WgT5z8+ p0Iv0RNxC2JBgRjbU0HHqe+rzeFBt5ltD2A30wwPJubYfg0AwwYffmHVpIbPoM0bhA+2 Lm5Wr8oNOQW8Z+MOmpvt/x7AZgQHuRcOU9NZzxGgXgIWOGWLachgp3qz7MwOUnpGj0qm Svlw== 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=dl/KmoCnxC0z+DlXhmOQbOfBMifsnYkbl3EqmkyT4Pg=; b=cNokoiYjqbRKx5Y9gEWkG7ise5EG/O+yX4EUzuwgVIeJZOwNlzqw+giWQNTuCKjiXU dC4jvb29eSL+r2U9JpBEViJdNCCYwuIc/o1Lgt3koDMBD1N9YoGha16BtIzp/4dU9HHt Kmnw2JNedh9d043iQuPMjFun246E3hMTYWqc3bd375qvWQbcA5r/zbJ1V1uIMIaw4+Kk c4HmTJ5xdfqsMlBzKbQt8Yph9oEIW63djs44ajcUP2d6UZ+1nx8GfJ5WKvNN6cXVZ6gG Fp63TGBc1kJbLwdQPAGjzmDzIWk+HuKiOnyXbDVljdntqw4QYoL+QKX2wtpnMUm68+LV rZGw== 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 p123-20020a622981000000b005939fff6d47si12183834pfp.326.2023.03.07.14.58.39; Tue, 07 Mar 2023 14:58:53 -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 S231735AbjCGWrj (ORCPT + 99 others); Tue, 7 Mar 2023 17:47:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230333AbjCGWrH (ORCPT ); Tue, 7 Mar 2023 17:47:07 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4DD5229E15; Tue, 7 Mar 2023 14:47:01 -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 957DF7A05DC; Tue, 7 Mar 2023 23:46:48 +0100 (CET) From: Ondrej Zary To: Damien Le Moal , Sudip Mukherjee 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 07/32] pata_parport-bpck6: remove org_* from struct ppc_storage Date: Tue, 7 Mar 2023 23:46:02 +0100 Message-Id: <20230307224627.28011-8-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230307224627.28011-1-linux@zary.sk> References: <20230307224627.28011-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?1759751630775228095?= X-GMAIL-MSGID: =?utf-8?q?1759751630775228095?= org_data duplicates saved_r0 and org_ctrl duplicates saved_r2 in pi->unit. Remove them. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/ppc6lnx.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c index dd9f3040f9a7..7ea8e8a31aeb 100644 --- a/drivers/ata/pata_parport/ppc6lnx.c +++ b/drivers/ata/pata_parport/ppc6lnx.c @@ -74,8 +74,6 @@ struct ppc_storage { // 5 = EPP Word // 6 = EPP Dword u8 ppc_flags; - u8 org_data; // original LPT data port contents - u8 org_ctrl; // original LPT control port contents u8 cur_ctrl; // current control port contents }; @@ -127,17 +125,17 @@ static int ppc6_select(struct pi_adapter *pi) if (i & 1) outb(i, pi->port + 1); - ppc->org_data = inb(pi->port); + pi->saved_r0 = inb(pi->port); - ppc->org_ctrl = inb(pi->port + 2) & 0x5F; // readback ctrl + pi->saved_r2 = inb(pi->port + 2) & 0x5F; // readback ctrl - ppc->cur_ctrl = ppc->org_ctrl; + ppc->cur_ctrl = pi->saved_r2; ppc->cur_ctrl |= port_sel; outb(ppc->cur_ctrl, pi->port + 2); - if (ppc->org_data == 'b') + if (pi->saved_r0 == 'b') outb('x', pi->port); outb('b', pi->port); @@ -195,9 +193,9 @@ static int ppc6_select(struct pi_adapter *pi) } } - outb(ppc->org_ctrl, pi->port + 2); + outb(pi->saved_r2, pi->port + 2); - outb(ppc->org_data, pi->port); + outb(pi->saved_r0, pi->port); return(0); // FAIL } @@ -214,11 +212,11 @@ static void ppc6_deselect(struct pi_adapter *pi) outb(ppc->cur_ctrl, pi->port + 2); - outb(ppc->org_data, pi->port); + outb(pi->saved_r0, pi->port); - outb((ppc->org_ctrl | port_sel), pi->port + 2); + outb((pi->saved_r2 | port_sel), pi->port + 2); - outb(ppc->org_ctrl, pi->port + 2); + outb(pi->saved_r2, pi->port + 2); } //***************************************************************************