* [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c
@ 2020-09-30 2:19 Ye Bin
2020-09-30 2:19 ` Ye Bin
2020-10-03 1:16 ` Martin K. Petersen
0 siblings, 2 replies; 5+ messages in thread
From: Ye Bin @ 2020-09-30 2:19 UTC (permalink / raw)
To: satishkh, sebaddel, kartilak, linux-scsi; +Cc: Ye Bin, Hulk Robot
fix follow warnings:
[drivers/scsi/fnic/fnic_debugfs.c:123]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
[drivers/scsi/fnic/fnic_debugfs.c:125]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
[drivers/scsi/fnic/fnic_debugfs.c:127]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 13f7d88d6e57..6c049360f136 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -120,11 +120,11 @@ static ssize_t fnic_trace_ctrl_read(struct file *filp,
len = 0;
trace_type = (u8 *)filp->private_data;
if (*trace_type == fc_trc_flag->fnic_trace)
- len = sprintf(buf, "%u\n", fnic_tracing_enabled);
+ len = sprintf(buf, "%d\n", fnic_tracing_enabled);
else if (*trace_type == fc_trc_flag->fc_trace)
- len = sprintf(buf, "%u\n", fnic_fc_tracing_enabled);
+ len = sprintf(buf, "%d\n", fnic_fc_tracing_enabled);
else if (*trace_type == fc_trc_flag->fc_clear)
- len = sprintf(buf, "%u\n", fnic_fc_trace_cleared);
+ len = sprintf(buf, "%d\n", fnic_fc_trace_cleared);
else
pr_err("fnic: Cannot read to any debugfs file\n");
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c
2020-09-30 2:19 [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c Ye Bin
@ 2020-09-30 2:19 ` Ye Bin
2020-09-30 22:25 ` Karan Tilak Kumar (kartilak)
2020-10-07 3:48 ` Martin K. Petersen
2020-10-03 1:16 ` Martin K. Petersen
1 sibling, 2 replies; 5+ messages in thread
From: Ye Bin @ 2020-09-30 2:19 UTC (permalink / raw)
To: satishkh, sebaddel, kartilak, linux-scsi; +Cc: Ye Bin, Hulk Robot
fix follow warnings:
[drivers/scsi/fnic/fnic_debugfs.c:123]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
[drivers/scsi/fnic/fnic_debugfs.c:125]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
[drivers/scsi/fnic/fnic_debugfs.c:127]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 13f7d88d6e57..6c049360f136 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -120,11 +120,11 @@ static ssize_t fnic_trace_ctrl_read(struct file *filp,
len = 0;
trace_type = (u8 *)filp->private_data;
if (*trace_type == fc_trc_flag->fnic_trace)
- len = sprintf(buf, "%u\n", fnic_tracing_enabled);
+ len = sprintf(buf, "%d\n", fnic_tracing_enabled);
else if (*trace_type == fc_trc_flag->fc_trace)
- len = sprintf(buf, "%u\n", fnic_fc_tracing_enabled);
+ len = sprintf(buf, "%d\n", fnic_fc_tracing_enabled);
else if (*trace_type == fc_trc_flag->fc_clear)
- len = sprintf(buf, "%u\n", fnic_fc_trace_cleared);
+ len = sprintf(buf, "%d\n", fnic_fc_trace_cleared);
else
pr_err("fnic: Cannot read to any debugfs file\n");
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c
2020-09-30 2:19 ` Ye Bin
@ 2020-09-30 22:25 ` Karan Tilak Kumar (kartilak)
2020-10-07 3:48 ` Martin K. Petersen
1 sibling, 0 replies; 5+ messages in thread
From: Karan Tilak Kumar (kartilak) @ 2020-09-30 22:25 UTC (permalink / raw)
To: Ye Bin, Satish Kharat (satishkh), Sesidhar Baddela (sebaddel),
linux-scsi
Cc: Hulk Robot
The fix looks good. Approved.
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Regards,
Karan
-----Original Message-----
From: Ye Bin <yebin10@huawei.com>
Sent: Tuesday, September 29, 2020 7:19 PM
To: Satish Kharat (satishkh) <satishkh@cisco.com>; Sesidhar Baddela (sebaddel) <sebaddel@cisco.com>; Karan Tilak Kumar (kartilak) <kartilak@cisco.com>; linux-scsi@vger.kernel.org
Cc: Ye Bin <yebin10@huawei.com>; Hulk Robot <hulkci@huawei.com>
Subject: [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c
fix follow warnings:
[drivers/scsi/fnic/fnic_debugfs.c:123]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
[drivers/scsi/fnic/fnic_debugfs.c:125]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
[drivers/scsi/fnic/fnic_debugfs.c:127]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'int'.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
drivers/scsi/fnic/fnic_debugfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c
index 13f7d88d6e57..6c049360f136 100644
--- a/drivers/scsi/fnic/fnic_debugfs.c
+++ b/drivers/scsi/fnic/fnic_debugfs.c
@@ -120,11 +120,11 @@ static ssize_t fnic_trace_ctrl_read(struct file *filp,
len = 0;
trace_type = (u8 *)filp->private_data;
if (*trace_type == fc_trc_flag->fnic_trace)
- len = sprintf(buf, "%u\n", fnic_tracing_enabled);
+ len = sprintf(buf, "%d\n", fnic_tracing_enabled);
else if (*trace_type == fc_trc_flag->fc_trace)
- len = sprintf(buf, "%u\n", fnic_fc_tracing_enabled);
+ len = sprintf(buf, "%d\n", fnic_fc_tracing_enabled);
else if (*trace_type == fc_trc_flag->fc_clear)
- len = sprintf(buf, "%u\n", fnic_fc_trace_cleared);
+ len = sprintf(buf, "%d\n", fnic_fc_trace_cleared);
else
pr_err("fnic: Cannot read to any debugfs file\n");
--
2.25.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c
2020-09-30 2:19 [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c Ye Bin
2020-09-30 2:19 ` Ye Bin
@ 2020-10-03 1:16 ` Martin K. Petersen
1 sibling, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-10-03 1:16 UTC (permalink / raw)
To: Ye Bin; +Cc: satishkh, sebaddel, kartilak, linux-scsi, Hulk Robot
Ye,
> fix follow warnings:
> [drivers/scsi/fnic/fnic_debugfs.c:123]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
> [drivers/scsi/fnic/fnic_debugfs.c:125]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
> [drivers/scsi/fnic/fnic_debugfs.c:127]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
Applied to 5.10/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c
2020-09-30 2:19 ` Ye Bin
2020-09-30 22:25 ` Karan Tilak Kumar (kartilak)
@ 2020-10-07 3:48 ` Martin K. Petersen
1 sibling, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2020-10-07 3:48 UTC (permalink / raw)
To: Ye Bin, sebaddel, satishkh, kartilak, linux-scsi
Cc: Martin K . Petersen, Hulk Robot
On Wed, 30 Sep 2020 10:19:19 +0800, Ye Bin wrote:
> fix follow warnings:
> [drivers/scsi/fnic/fnic_debugfs.c:123]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
> [drivers/scsi/fnic/fnic_debugfs.c:125]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
> [drivers/scsi/fnic/fnic_debugfs.c:127]: (warning) %u in format string (no. 1)
> requires 'unsigned int' but the argument type is 'int'.
Applied to 5.10/scsi-queue, thanks!
[1/1] scsi: fnic: Fix inconsistent format argument type in fnic_debugfs.c
https://git.kernel.org/mkp/scsi/c/1dfbed19455b
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-10-07 3:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 2:19 [PATCH] scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c Ye Bin
2020-09-30 2:19 ` Ye Bin
2020-09-30 22:25 ` Karan Tilak Kumar (kartilak)
2020-10-07 3:48 ` Martin K. Petersen
2020-10-03 1:16 ` 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.