ata: pata_artop: remove redundant initialization of pio

This change “ata: pata_artop: remove redundant initialization of pio” (commit 01bb12e) in Linux kernel is authored by Colin Ian King <colin.king [at] canonical.com> on Thu Sep 14 19:54:18 2017 +0100.

Description of "ata: pata_artop: remove redundant initialization of pio"

The change “ata: pata_artop: remove redundant initialization of pio” introduces changes as follows.

ata: pata_artop: remove redundant initialization of pio

pio is initialized and the data is never read, instead it is almost
immediately being updated to a new value. Fix this by removing the
initialization.

Detected by scan-build:
"warning: Value stored to 'pio' during its initialization is never read"

Fixes: 669a5db411d8 ("[libata] Add a bunch of PATA drivers")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

Linux kernel releases containing commit 01bb12e

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "ata: pata_artop: remove redundant initialization of pio"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/ata/pata_artop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 96c05c9494fa..6b3355343542 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -242,7 +242,7 @@ static void artop6210_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 
 static void artop6260_set_dmamode (struct ata_port *ap, struct ata_device *adev)
 {
-	unsigned int pio	= adev->pio_mode - XFER_PIO_0;
+	unsigned int pio;
 	struct pci_dev *pdev	= to_pci_dev(ap->host->dev);
 	u8 ultra;
 

The commit for this change in Linux stable tree is 01bb12e (patch).

Last modified: 2020/02/09