From patchwork Tue Mar 7 22:46:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ondrej Zary X-Patchwork-Id: 65938 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp8197wrd; Tue, 7 Mar 2023 15:00:04 -0800 (PST) X-Google-Smtp-Source: AK7set9anXI6pKIkqC7+cJhJ+bWfl87y+KmlkF63Zw89dGZ2T5xnBmQ8QRl0RA/Ie4a4ZdmTGwU4 X-Received: by 2002:a05:6402:337:b0:4be:b37d:6134 with SMTP id q23-20020a056402033700b004beb37d6134mr14750403edw.5.1678230003810; Tue, 07 Mar 2023 15:00:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678230003; cv=none; d=google.com; s=arc-20160816; b=d8HSJXsdTiv+NGmFt4UaODFjXSQGp6OAQyX6lTUVfosPm7h20OuZQgyX8R/7qhw80v QySyr4sKvP0RQxztlRosVj5LMh5hnuMJxM6x1ABB7ZYcpBUWycGrR6qDNqFGG9ZLMo2x y+2Zb/CDLqFrZU+thd9ZmFS8N0Cx/qLDW8zhqgNENzznQ0NgEcU3fkUB7209V7owvmLd hFcbfi0udAEk9Z+3EbNzikDtFOeN46tazroGfTwCuqEeRLPbgbALl8m3fKzMOYFtXHJv JA+Y7UsK3/BYVjMtbRfnB59keFX5cgivdo1GEgTmLsLUU6trx+DRKyTJUG7La/DVa/WB LJWQ== 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=7M1gl9xr2OE6iWPtpvXUIJY0M56c/H28ZJCSN106qLo=; b=NEgwcmLlXcw/owIepGc9Fi1nDOxHkYmzPKdE9PGUSxIWH3aeaYNipx+RvJ+WUycOcr +CpZu2h1OAZHHTvZy+5kZRjVOBmYw+mHwn+4FtpSCWdg3JX4OlnMNq//JLgHuL3kMkxs GOLQY+TB0FnE2dgX/iBVeaw85+JTJNJD1RN589ZUPHgWR77Y4Sv7mlfcDbQtQLZ2VLdH fsc9t35mF+KGlD+lVSeg/oT6/N00z5lK/uMsqkGKW7qU3ceFgMzk4n5MrtHmfNqh8gJq T93b/sAdRVc/8v/9d3l/9ZeVu76z/AG7JT6yA87HkCGkXCp/NlKd0z7YRLxUrxiMzmks pEkQ== 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 bf14-20020a0564021a4e00b004bc696040c8si14901157edb.508.2023.03.07.14.59.39; Tue, 07 Mar 2023 15:00:03 -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 S230034AbjCGWr2 (ORCPT + 99 others); Tue, 7 Mar 2023 17:47:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230075AbjCGWrE (ORCPT ); Tue, 7 Mar 2023 17:47:04 -0500 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC646E067; Tue, 7 Mar 2023 14:47:00 -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 7921D7A05D5; 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 06/32] pata_parport-bpck6: remove ppc_id from struct ppc_storage Date: Tue, 7 Mar 2023 23:46:01 +0100 Message-Id: <20230307224627.28011-7-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?1759751704676610603?= X-GMAIL-MSGID: =?utf-8?q?1759751704676610603?= ppc_id duplicates pi->unit. Remove it. Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov --- drivers/ata/pata_parport/bpck6.c | 7 ------- drivers/ata/pata_parport/ppc6lnx.c | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/ata/pata_parport/bpck6.c b/drivers/ata/pata_parport/bpck6.c index 50d313fc529e..176bf456c698 100644 --- a/drivers/ata/pata_parport/bpck6.c +++ b/drivers/ata/pata_parport/bpck6.c @@ -72,13 +72,9 @@ static void bpck6_disconnect(struct pi_adapter *pi) static int bpck6_test_port(struct pi_adapter *pi) /* check for 8-bit port */ { - struct ppc_storage *ppc = (void *)(pi->private); dev_dbg(&pi->dev, "PARPORT indicates modes=%x for lp=0x%lx\n", pi->pardev->port->modes, pi->pardev->port->base); - /*copy over duplicate stuff.. initialize state info*/ - ppc->ppc_id = pi->unit; - /* look at the parport device to see what modes we can use */ if (pi->pardev->port->modes & PARPORT_MODE_EPP) return 5; /* Can do EPP */ @@ -94,9 +90,6 @@ static int bpck6_probe_unit(struct pi_adapter *pi) dev_dbg(&pi->dev, "PROBE UNIT %x on port:%x\n", pi->unit, pi->port); - /*SET PPC UNIT NUMBER*/ - ppc->ppc_id = pi->unit; - /*LOWER DOWN TO UNIDIRECTIONAL*/ ppc->mode = 1; diff --git a/drivers/ata/pata_parport/ppc6lnx.c b/drivers/ata/pata_parport/ppc6lnx.c index c00e561cc833..dd9f3040f9a7 100644 --- a/drivers/ata/pata_parport/ppc6lnx.c +++ b/drivers/ata/pata_parport/ppc6lnx.c @@ -65,7 +65,6 @@ //*************************************************************************** struct ppc_storage { - u8 ppc_id; u8 mode; // operating mode // 0 = PPC Uni SW // 1 = PPC Uni FW @@ -143,8 +142,8 @@ static int ppc6_select(struct pi_adapter *pi) outb('b', pi->port); outb('p', pi->port); - outb(ppc->ppc_id, pi->port); - outb(~ppc->ppc_id, pi->port); + outb(pi->unit, pi->port); + outb(~pi->unit, pi->port); ppc->cur_ctrl &= ~port_sel;