Skip to contentSkip to conversation

ata: fix sparse warning in libata-core.c

PATCH In review Harvey Harrison 1 participant 1 message Feb 14, 2008 libata

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 ata: fix sparse warning in libata-core.c

rc is used to test the return value and possibly return an error. No need to redeclare inside the loop.

drivers/ata/libata-core.c:7089:7: warning: symbol 'rc' shadows an earlier one drivers/ata/libata-core.c:7030:9: originally declared here

---
 drivers/ata/libata-core.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/ata/libata-core.c +0 -1
index 004dae4..beaa3a9 100644
@@ -7086,7 +7086,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
 	DPRINTK("probe begin\n");
 	for (i = 0; i < host->n_ports; i++) {
 		struct ata_port *ap = host->ports[i];
-		int rc;
 
 		/* probe */
 		if (ap->ops->error_handler) {
Signature · 1 line
1.5.4.1.1278.gc75be