* [PATCH] scsi: myrb: Fix inconsistent of format with argument type in myrb.c
@ 2020-09-30 2:16 Ye Bin
2020-10-08 3:00 ` Martin K. Petersen
2020-10-13 22:43 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Ye Bin @ 2020-09-30 2:16 UTC (permalink / raw)
To: hare, linux-scsi; +Cc: Ye Bin, Hulk Robot
Fix follow 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'.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/scsi/myrb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/myrb.c b/drivers/scsi/myrb.c
index cbf1e8b091b9..df4ac3f1ca3f 100644
--- a/drivers/scsi/myrb.c
+++ b/drivers/scsi/myrb.c
@@ -1050,7 +1050,7 @@ static int myrb_get_hba_config(struct myrb_hba *cb)
enquiry2->fw.turn_id = 0;
}
snprintf(cb->fw_version, sizeof(cb->fw_version),
- "%d.%02d-%c-%02d",
+ "%u.%02u-%c-%02u",
enquiry2->fw.major_version,
enquiry2->fw.minor_version,
enquiry2->fw.firmware_type,
@@ -2167,7 +2167,7 @@ static ssize_t ctlr_num_show(struct device *dev,
struct Scsi_Host *shost = class_to_shost(dev);
struct myrb_hba *cb = shost_priv(shost);
- return snprintf(buf, 20, "%d\n", cb->ctlr_num);
+ return snprintf(buf, 20, "%u\n", cb->ctlr_num);
}
static DEVICE_ATTR_RO(ctlr_num);
--
2.25.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: myrb: Fix inconsistent of format with argument type in myrb.c
2020-09-30 2:16 [PATCH] scsi: myrb: Fix inconsistent of format with argument type in myrb.c Ye Bin
@ 2020-10-08 3:00 ` Martin K. Petersen
2020-10-13 22:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-10-08 3:00 UTC (permalink / raw)
To: Ye Bin; +Cc: hare, linux-scsi, Hulk Robot
Ye,
> Fix follow 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'.
Applied to 5.10/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: myrb: Fix inconsistent of format with argument type in myrb.c
2020-09-30 2:16 [PATCH] scsi: myrb: Fix inconsistent of format with argument type in myrb.c Ye Bin
2020-10-08 3:00 ` Martin K. Petersen
@ 2020-10-13 22:43 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2020-10-13 22:43 UTC (permalink / raw)
To: Ye Bin, hare, linux-scsi; +Cc: Martin K . Petersen, Hulk Robot
On Wed, 30 Sep 2020 10:16:37 +0800, Ye Bin wrote:
> Fix follow 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'.
Applied to 5.10/scsi-queue, thanks!
[1/1] scsi: myrb: Fix inconsistent format argument types
https://git.kernel.org/mkp/scsi/c/fc29f04a5c6b
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-13 22:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 2:16 [PATCH] scsi: myrb: Fix inconsistent of format with argument type in myrb.c Ye Bin
2020-10-08 3:00 ` Martin K. Petersen
2020-10-13 22:43 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.