Skip to contentSkip to conversation

scsi: fnic: Fix inconsistent of format with argument type in fnic_debugfs.c

PATCH Applied Ye Bin 3 participants 5 messages Sep 30, 2020 – Oct 7, 2020

Subsystems (2)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

PATCH 1/1 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'.

---
 drivers/scsi/fnic/fnic_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/fnic/fnic_debugfs.c +3 -3
index 13f7d88d6e57..6c049360f136 100644
@@ -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");
 
Signature · 1 line
2.25.4
author
#1 lore raw

PATCH 1/1 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'.

---
 drivers/scsi/fnic/fnic_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/fnic/fnic_debugfs.c +3 -3
index 13f7d88d6e57..6c049360f136 100644
@@ -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");
 
Signature · 1 line
2.25.4
#2 lore raw

The fix looks good. Approved.

Regards,
Karan

-----Original Message-----
From: Ye Bin <[email protected]>
Sent: Tuesday, September 29, 2020 7:19 PM
To: Satish Kharat (satishkh) <[email protected]>; Sesidhar Baddela (sebaddel) <[email protected]>; Karan Tilak Kumar (kartilak) <[email protected]>; [email protected]
Cc: Ye Bin <[email protected]>; Hulk Robot <[email protected]>
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'.

---
 drivers/scsi/fnic/fnic_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/fnic/fnic_debugfs.c +3 -3
index 13f7d88d6e57..6c049360f136 100644
@@ -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");
 
Signature · 1 line
2.25.4
#3 lore raw
In reply to Ye Bin
Quoted 7 lines · Ye Bin

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
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#4 lore raw
In reply to Ye Bin

Ye,

Quoted 7 lines

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!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering