scsi: esas2r: Fix inconsistent of format with argument type
Subsystems (2)
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'.
Reported-by Hulk Robot <[email protected]>
Signed-off-by Ye Bin <[email protected]>
--- drivers/scsi/esas2r/esas2r_vda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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)));
Signature · 1 line
2.25.4
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