lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230307224627.28011-7-linux@zary.sk>
Date:   Tue,  7 Mar 2023 23:46:01 +0100
From:   Ondrej Zary <linux@...y.sk>
To:     Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
        Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:     Christoph Hellwig <hch@....de>,
        Sergey Shtylyov <s.shtylyov@....ru>,
        Jens Axboe <axboe@...nel.dk>, Tim Waugh <tim@...erelk.net>,
        linux-block@...r.kernel.org, linux-parport@...ts.infradead.org,
        linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 06/32] pata_parport-bpck6: remove ppc_id from struct ppc_storage

ppc_id duplicates pi->unit. Remove it.

Signed-off-by: Ondrej Zary <linux@...y.sk>
---
 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;
 
-- 
Ondrej Zary

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ