Skip to contentSkip to conversation

lpfc: two branches the same in lpfc_decode_firmware_rev()

PATCH In review Roel Kluin 2 participants 3 messages Jan 17, 2010 – Jan 19, 2010

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 lpfc: two branches the same in lpfc_decode_firmware_rev()

Regardless of the flag state, the branches execute the same code

---
 drivers/scsi/lpfc/lpfc_ct.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +1 -6
index 0ebcd9b..bf7bf62 100644
@@ -1843,12 +1843,7 @@ lpfc_decode_firmware_rev(struct lpfc_hba *phba, char *fwrevision, int flag)
 		c  = (rev & 0x0000ff00) >> 8;
 		b4 = (rev & 0x000000ff);
 
-		if (flag)
-			sprintf(fwrevision, "%d.%d%d%c%d ", b1,
-				b2, b3, c, b4);
-		else
-			sprintf(fwrevision, "%d.%d%d%c%d ", b1,
-				b2, b3, c, b4);
+		sprintf(fwrevision, "%d.%d%d%c%d", b1, b2, b3, c, b4);
 	}
 	return;
 }
Acked-by on v1 1/1
#1 lore raw

-- james s

Quoted 27 lines · Roel Kluin

Regardless of the flag state, the branches execute the same code

---
 drivers/scsi/lpfc/lpfc_ct.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +1 -6
index 0ebcd9b..bf7bf62 100644
@@ -1843,12 +1843,7 @@ lpfc_decode_firmware_rev(struct lpfc_hba *phba, char *fwrevision, int flag)
 		c  = (rev & 0x0000ff00) >> 8;
 		b4 = (rev & 0x000000ff);
 
-		if (flag)
-			sprintf(fwrevision, "%d.%d%d%c%d ", b1,
-				b2, b3, c, b4);
-		else
-			sprintf(fwrevision, "%d.%d%d%c%d ", b1,
-				b2, b3, c, b4);
+		sprintf(fwrevision, "%d.%d%d%c%d", b1, b2, b3, c, b4);
 	}
 	return;
 }
Acked-by on v1 1/1
#2 lore raw
In reply to Roel Kluin

-- james s

Quoted 26 lines · Roel Kluin

Regardless of the flag state, the branches execute the same code

---
 drivers/scsi/lpfc/lpfc_ct.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/scsi/lpfc/lpfc_ct.c +1 -6
index 0ebcd9b..bf7bf62 100644
@@ -1843,12 +1843,7 @@ lpfc_decode_firmware_rev(struct lpfc_hba *phba, char *fwrevision, int flag)
 		c  = (rev & 0x0000ff00) >> 8;
 		b4 = (rev & 0x000000ff);
 
-		if (flag)
-			sprintf(fwrevision, "%d.%d%d%c%d ", b1,
-				b2, b3, c, b4);
-		else
-			sprintf(fwrevision, "%d.%d%d%c%d ", b1,
-				b2, b3, c, b4);
+		sprintf(fwrevision, "%d.%d%d%c%d", b1, b2, b3, c, b4);
 	}
 	return;
 }