Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Tejun Heo
01bb12e4 f4ac6476

+1 -1
+1 -1
drivers/ata/pata_artop.c
··· 242 242 243 243 static void artop6260_set_dmamode (struct ata_port *ap, struct ata_device *adev) 244 244 { 245 - unsigned int pio = adev->pio_mode - XFER_PIO_0; 245 + unsigned int pio; 246 246 struct pci_dev *pdev = to_pci_dev(ap->host->dev); 247 247 u8 ultra; 248 248