Skip to contentSkip to conversation

libata: remove unused variable from ata_eh_reset()

PATCH Applied Tejun Heo 2 participants 2 messages Jun 25, 2007 – Jun 27, 2007 libata

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 libata: remove unused variable from ata_eh_reset()

Removed unused variable did_followup_srst from ata_eh_reset().

---
 drivers/ata/libata-eh.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/ata/libata-eh.c +1 -3
index d807098..48d2d54 100644
@@ -1616,7 +1616,7 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
 	unsigned long deadline;
 	unsigned int action;
 	ata_reset_fn_t reset;
-	int i, did_followup_srst, rc;
+	int i, rc;
 
 	/* about to reset */
 	ata_eh_about_to_do(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK);
@@ -1689,11 +1689,9 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
 
 	rc = ata_do_reset(ap, reset, classes, deadline);
 
-	did_followup_srst = 0;
 	if (reset == hardreset &&
 	    ata_eh_followup_srst_needed(rc, classify, classes)) {
 		/* okay, let's do follow-up softreset */
-		did_followup_srst = 1;
 		reset = softreset;
 
 		if (!reset) {
Applied
#1 lore raw
Quoted 21 lines · Tejun Heo

Removed unused variable did_followup_srst from ata_eh_reset().

---
 drivers/ata/libata-eh.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/ata/libata-eh.c +1 -1
index d807098..48d2d54 100644
@@ -1616,7 +1616,7 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
 	unsigned long deadline;
 	unsigned int action;
 	ata_reset_fn_t reset;
-	int i, did_followup_srst, rc;
+	int i, rc;
 
 	/* about to reset */
 	ata_eh_about_to_do(ap, NULL, ehc->i.action & ATA_EH_RESET_MASK);

drivers/ata/libata-eh.c static int ata_eh_reset(struct ata_port *ap, int classify, · line 1696

Quoted 10 lines
drivers/ata/libata-eh.c +0 -2
@@ -1689,11 +1689,9 @@ static int ata_eh_reset(struct ata_port *ap, int classify,
 
 	rc = ata_do_reset(ap, reset, classes, deadline);
 
-	did_followup_srst = 0;
 	if (reset == hardreset &&
 	    ata_eh_followup_srst_needed(rc, classify, classes)) {
 		/* okay, let's do follow-up softreset */
-		did_followup_srst = 1;
 		reset = softreset;
 

applied