Skip to contentSkip to conversation

scsi: esas2r: Fix inconsistent of format with argument type

PATCH In review Ye Bin 2 participants 2 messages Sep 30, 2020 – Oct 8, 2020

Subsystems (2)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 scsi: esas2r: Fix inconsistent of format with argument type

Fix follow warnings:
[drivers/scsi/esas2r/esas2r_vda.c:313]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/esas2r/esas2r_vda.c:313]: (warning) %u in format string (no. 2)
requires 'unsigned int' but the argument type is 'signed int'.

---
 drivers/scsi/esas2r/esas2r_vda.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/esas2r/esas2r_vda.c +1 -1
index 30028e56df63..e655b87ddb6b 100644
@@ -310,7 +310,7 @@ static void esas2r_complete_vda_ioctl(struct esas2r_adapter *a,
 				le32_to_cpu(rsp->vda_version);
 			cfg->data.init.fw_build = rsp->fw_build;
 
-			snprintf(buf, sizeof(buf), "%1.1u.%2.2u",
+			snprintf(buf, sizeof(buf), "%1.1d.%2.2d",
 				 (int)LOBYTE(le16_to_cpu(rsp->fw_release)),
 				 (int)HIBYTE(le16_to_cpu(rsp->fw_release)));
 
Signature · 1 line
2.25.4
#1 lore raw

Hello Ye,

drivers/scsi/esas2r/esas2r_vda.c static void esas2r_complete_vda_ioctl(struct esas2r_adapter *a, · line 315

Quoted 8 lines
drivers/scsi/esas2r/esas2r_vda.c +1 -1
@@ -310,7 +310,7 @@ static void esas2r_complete_vda_ioctl(struct esas2r_adapter *a,
 				le32_to_cpu(rsp->vda_version);
 			cfg->data.init.fw_build = rsp->fw_build;
 
-			snprintf(buf, sizeof(buf), "%1.1u.%2.2u",
+			snprintf(buf, sizeof(buf), "%1.1d.%2.2d",
 				 (int)LOBYTE(le16_to_cpu(rsp->fw_release)),
 				 (int)HIBYTE(le16_to_cpu(rsp->fw_release)));

I doubt the firmware release is a negative number.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering