Skip to content

Commit fc29f04

Browse files
Ye Binmartinkpetersen
authored andcommitted
scsi: myrb: Fix inconsistent format argument types
Fix the following warnings: [drivers/scsi/myrb.c:1052]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [drivers/scsi/myrb.c:1052]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. [drivers/scsi/myrb.c:1052]: (warning) %d in format string (no. 4) requires 'int' but the argument type is 'unsigned int'. [drivers/scsi/myrb.c:2170]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. Link: https://lore.kernel.org/r/20200930021637.2831618-1-yebin10@huawei.com Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ye Bin <yebin10@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 5f6dcb5 commit fc29f04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/myrb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ static int myrb_get_hba_config(struct myrb_hba *cb)
10501050
enquiry2->fw.turn_id = 0;
10511051
}
10521052
snprintf(cb->fw_version, sizeof(cb->fw_version),
1053-
"%d.%02d-%c-%02d",
1053+
"%u.%02u-%c-%02u",
10541054
enquiry2->fw.major_version,
10551055
enquiry2->fw.minor_version,
10561056
enquiry2->fw.firmware_type,
@@ -2167,7 +2167,7 @@ static ssize_t ctlr_num_show(struct device *dev,
21672167
struct Scsi_Host *shost = class_to_shost(dev);
21682168
struct myrb_hba *cb = shost_priv(shost);
21692169

2170-
return snprintf(buf, 20, "%d\n", cb->ctlr_num);
2170+
return snprintf(buf, 20, "%u\n", cb->ctlr_num);
21712171
}
21722172
static DEVICE_ATTR_RO(ctlr_num);
21732173

0 commit comments

Comments
 (0)