Skip to contentSkip to conversation

Fix inconsistent of format with argument type

PATCH Applied Ye Bin 4 participants 12 messages Sep 30, 2020 – Oct 7, 2020

Subsystems (2)
lore
Share & tools
lore

Ye Bin

author
#0 lore raw

cover Fix inconsistent of format with argument type

Ye Bin (3):
scsi: qla2xxx: Fix inconsistent of format with argument type in
tcm_qla2xxx.c
scsi: qla2xxx: Fix inconsistent of format with argument type in
qla_os.c
scsi: qla2xxx: Fix inconsistent of format with argument type in
qla_dbg.c

 drivers/scsi/qla2xxx/qla_dbg.c     | 2 +-
 drivers/scsi/qla2xxx/qla_os.c      | 4 ++--
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
Signature · 1 line
2.25.4
author
#1 lore raw

PATCH 1/3 scsi: qla2xxx: Fix inconsistent of format with argument type in tcm_qla2xxx.c

Fix follow warnings:
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:884]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:885]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:886]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:887]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:888]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.

---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/tcm_qla2xxx.c +1 -1
index 44bfe162654a..61017acd3458 100644
@@ -850,7 +850,7 @@ static ssize_t tcm_qla2xxx_tpg_attrib_##name##_show(			\
 	struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg,		\
 			struct tcm_qla2xxx_tpg, se_tpg);		\
 									\
-	return sprintf(page, "%u\n", tpg->tpg_attrib.name);	\
+	return sprintf(page, "%d\n", tpg->tpg_attrib.name);	\
 }									\
 									\
 static ssize_t tcm_qla2xxx_tpg_attrib_##name##_store(			\
Signature · 1 line
2.25.4
maintainer Reviewed-by on v1 1/3
#2 lore raw

RE: [EXT] [PATCH 1/3] scsi: qla2xxx: Fix inconsistent of format with argument type in tcm_qla2xxx.c

Quoted 52 lines

-----Original Message-----
From: Ye Bin <[email protected]>
Sent: Wednesday, September 30, 2020 7:55 AM
To: Nilesh Javali <[email protected]>; GR-QLogic-Storage-Upstream <GR- [email protected]>; [email protected]
Cc: Ye Bin <[email protected]>; Hulk Robot <[email protected]>
Subject: [EXT] [PATCH 1/3] scsi: qla2xxx: Fix inconsistent of format with argument type in tcm_qla2xxx.c

External Email

----------------------------------------------------------------------
Fix follow warnings:
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:884]: (warning) %u in format string (no.
1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:885]: (warning) %u in format string (no.
1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:886]: (warning) %u in format string (no.
1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:887]: (warning) %u in format string (no.
1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:888]: (warning) %u in format string (no.
1)
requires 'unsigned int' but the argument type is 'signed int'.

---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/tcm_qla2xxx.c +1 -1
index 44bfe162654a..61017acd3458 100644
@@ -850,7 +850,7 @@ static ssize_t
 tcm_qla2xxx_tpg_attrib_##name##_show(			\
 	struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg,		\
 			struct tcm_qla2xxx_tpg, se_tpg);		\
 									\
-	return sprintf(page, "%u\n", tpg->tpg_attrib.name);	\
+	return sprintf(page, "%d\n", tpg->tpg_attrib.name);	\
 }									\
 									\

static ssize_t tcm_qla2xxx_tpg_attrib_##name##_store(

Quoted 3 lines
	\

--
2.25.4

Ye Bin,
Thanks for the patches.

Reviewed-by on v1 1/3
#3 lore raw

Re: [PATCH 1/3] scsi: qla2xxx: Fix inconsistent of format with argument type in tcm_qla2xxx.c

In reply to Ye Bin
Quoted 38 lines · Ye Bin

Fix follow warnings:
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:884]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:885]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:886]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:887]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.
[drivers/scsi/qla2xxx/tcm_qla2xxx.c:888]: (warning) %u in format string (no. 1)
requires 'unsigned int' but the argument type is 'signed int'.

---
drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/tcm_qla2xxx.c +1 -1
index 44bfe162654a..61017acd3458 100644
@@ -850,7 +850,7 @@ static ssize_t tcm_qla2xxx_tpg_attrib_##name##_show(			\
 	struct tcm_qla2xxx_tpg *tpg = container_of(se_tpg,		\
 			struct tcm_qla2xxx_tpg, se_tpg);		\
 									\
-	return sprintf(page, "%u\n", tpg->tpg_attrib.name);	\
+	return sprintf(page, "%d\n", tpg->tpg_attrib.name);	\
 }									\
 									\
 static ssize_t tcm_qla2xxx_tpg_attrib_##name##_store(			\
Signature · 1 line
2.25.4

Looks good.

--
Himanshu Madhani Oracle Linux Engineering

author
#4 lore raw

PATCH 2/3 scsi: qla2xxx: Fix inconsistent of format with argument type in qla_os.c

In reply to Ye Bin

Fix follow warning:
[drivers/scsi/qla2xxx/qla_os.c:4882]: (warning) %ld in format string (no. 2)
requires 'long' but the argument type is 'unsigned long'.
[drivers/scsi/qla2xxx/qla_os.c:5011]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.

---
 drivers/scsi/qla2xxx/qla_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +2 -2
index 910a6ed0ccc7..473a02603697 100644
@@ -4879,7 +4879,7 @@ struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *sht,
 	}
 	INIT_DELAYED_WORK(&vha->scan.scan_work, qla_scan_work_fn);
 
-	sprintf(vha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, vha->host_no);
+	sprintf(vha->host_str, "%s_%lu", QLA2XXX_DRIVER_NAME, vha->host_no);
 	ql_dbg(ql_dbg_init, vha, 0x0041,
 	    "Allocated the host=%p hw=%p vha=%p dev_name=%s",
 	    vha->host, vha->hw, vha,
@@ -5008,7 +5008,7 @@ qla2x00_uevent_emit(struct scsi_qla_host *vha, u32 code)
 
 	switch (code) {
 	case QLA_UEVENT_CODE_FW_DUMP:
-		snprintf(event_string, sizeof(event_string), "FW_DUMP=%ld",
+		snprintf(event_string, sizeof(event_string), "FW_DUMP=%lu",
 		    vha->host_no);
 		break;
 	default:
Signature · 1 line
2.25.4
maintainer Reviewed-by on v1 2/3
#5 lore raw

RE: [PATCH 2/3] scsi: qla2xxx: Fix inconsistent of format with argument type in qla_os.c

Quoted 48 lines

-----Original Message-----
From: Ye Bin <[email protected]>
Sent: Wednesday, September 30, 2020 7:55 AM
To: Nilesh Javali <[email protected]>; GR-QLogic-Storage-Upstream <GR- [email protected]>; [email protected]
Cc: Ye Bin <[email protected]>; Hulk Robot <[email protected]>
Subject: [PATCH 2/3] scsi: qla2xxx: Fix inconsistent of format with argument type in qla_os.c

Fix follow warning:
[drivers/scsi/qla2xxx/qla_os.c:4882]: (warning) %ld in format string (no. 2)
requires 'long' but the argument type is 'unsigned long'.
[drivers/scsi/qla2xxx/qla_os.c:5011]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.

---
 drivers/scsi/qla2xxx/qla_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
index 910a6ed0ccc7..473a02603697 100644
@@ -4879,7 +4879,7 @@ struct scsi_qla_host *qla2x00_create_host(struct
 scsi_host_template *sht,
 	}
 	INIT_DELAYED_WORK(&vha->scan.scan_work, qla_scan_work_fn);
 
-	sprintf(vha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, vha-
 >host_no);
+	sprintf(vha->host_str, "%s_%lu", QLA2XXX_DRIVER_NAME, vha-
 >host_no);
drivers/scsi/qla2xxx/qla_os.c +1 -1
 	ql_dbg(ql_dbg_init, vha, 0x0041,
 	    "Allocated the host=%p hw=%p vha=%p dev_name=%s",
 	    vha->host, vha->hw, vha,
@@ -5008,7 +5008,7 @@ qla2x00_uevent_emit(struct scsi_qla_host *vha,
 u32 code)
 
 	switch (code) {
 	case QLA_UEVENT_CODE_FW_DUMP:
-		snprintf(event_string, sizeof(event_string), "FW_DUMP=%ld",
+		snprintf(event_string, sizeof(event_string), "FW_DUMP=%lu",
 		    vha->host_no);
 		break;
Quoted 3 lines

default:
--
2.25.4

Reviewed-by on v1 2/3
#6 lore raw

Re: [PATCH 2/3] scsi: qla2xxx: Fix inconsistent of format with argument type in qla_os.c

In reply to Ye Bin
Quoted 41 lines · Ye Bin

Fix follow warning:
[drivers/scsi/qla2xxx/qla_os.c:4882]: (warning) %ld in format string (no. 2)
requires 'long' but the argument type is 'unsigned long'.
[drivers/scsi/qla2xxx/qla_os.c:5011]: (warning) %ld in format string (no. 1)
requires 'long' but the argument type is 'unsigned long'.

---
drivers/scsi/qla2xxx/qla_os.c | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +2 -2
index 910a6ed0ccc7..473a02603697 100644
@@ -4879,7 +4879,7 @@ struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *sht,
 	}
 	INIT_DELAYED_WORK(&vha->scan.scan_work, qla_scan_work_fn);
 
-	sprintf(vha->host_str, "%s_%ld", QLA2XXX_DRIVER_NAME, vha->host_no);
+	sprintf(vha->host_str, "%s_%lu", QLA2XXX_DRIVER_NAME, vha->host_no);
 	ql_dbg(ql_dbg_init, vha, 0x0041,
 	    "Allocated the host=%p hw=%p vha=%p dev_name=%s",
 	    vha->host, vha->hw, vha,
@@ -5008,7 +5008,7 @@ qla2x00_uevent_emit(struct scsi_qla_host *vha, u32 code)
 
 	switch (code) {
 	case QLA_UEVENT_CODE_FW_DUMP:
-		snprintf(event_string, sizeof(event_string), "FW_DUMP=%ld",
+		snprintf(event_string, sizeof(event_string), "FW_DUMP=%lu",
 		    vha->host_no);
 		break;
 	default:
Signature · 1 line
2.25.4

Looks good.

--
Himanshu Madhani Oracle Linux Engineering

author
#7 lore raw

PATCH 3/3 scsi: qla2xxx: Fix inconsistent of format with argument type in qla_dbg.c

In reply to Ye Bin

Fix follow warning:
[drivers/scsi/qla2xxx/qla_dbg.c:2451]: (warning) %ld in format string (no. 4)
requires 'long' but the argument type is 'unsigned long'.

---
 drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
index 1434789c9919..bb7431912d41 100644
@@ -2448,7 +2448,7 @@ static void ql_dbg_prefix(char *pbuf, int pbuf_size,
 		const struct pci_dev *pdev = vha->hw->pdev;
 
 		/* <module-name> [<dev-name>]-<msg-id>:<host>: */
-		snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%ld: ", QL_MSGHDR,
+		snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%lu: ", QL_MSGHDR,
 			 dev_name(&(pdev->dev)), msg_id, vha->host_no);
 	} else {
 		/* <module-name> [<dev-name>]-<msg-id>: : */
Signature · 1 line
2.25.4
maintainer Reviewed-by on v1 3/3
#8 lore raw

RE: [PATCH 3/3] scsi: qla2xxx: Fix inconsistent of format with argument type in qla_dbg.c

Quoted 35 lines

-----Original Message-----
From: Ye Bin <[email protected]>
Sent: Wednesday, September 30, 2020 7:55 AM
To: Nilesh Javali <[email protected]>; GR-QLogic-Storage-Upstream <GR- [email protected]>; [email protected]
Cc: Ye Bin <[email protected]>; Hulk Robot <[email protected]>
Subject: [PATCH 3/3] scsi: qla2xxx: Fix inconsistent of format with argument type in qla_dbg.c

Fix follow warning:
[drivers/scsi/qla2xxx/qla_dbg.c:2451]: (warning) %ld in format string (no. 4)
requires 'long' but the argument type is 'unsigned long'.

---
 drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_dbg.c +1 -2
index 1434789c9919..bb7431912d41 100644
@@ -2448,7 +2448,7 @@ static void ql_dbg_prefix(char *pbuf, int pbuf_size,
 		const struct pci_dev *pdev = vha->hw->pdev;
 
 		/* <module-name> [<dev-name>]-<msg-id>:<host>: */
-		snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%ld: ", QL_MSGHDR,
+		snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%lu: ", QL_MSGHDR,
 			 dev_name(&(pdev->dev)), msg_id, vha->host_no);
 	} else {
 		/* <module-name> [<dev-name>]-<msg-id>: : */
--
Quoted 1 line

2.25.4

Reviewed-by on v1 3/3
#9 lore raw

Re: [PATCH 3/3] scsi: qla2xxx: Fix inconsistent of format with argument type in qla_dbg.c

In reply to Ye Bin
Quoted 30 lines · Ye Bin

Fix follow warning:
[drivers/scsi/qla2xxx/qla_dbg.c:2451]: (warning) %ld in format string (no. 4)
requires 'long' but the argument type is 'unsigned long'.

---
drivers/scsi/qla2xxx/qla_dbg.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_dbg.c +1 -1
index 1434789c9919..bb7431912d41 100644
@@ -2448,7 +2448,7 @@ static void ql_dbg_prefix(char *pbuf, int pbuf_size,
 		const struct pci_dev *pdev = vha->hw->pdev;
 
 		/* <module-name> [<dev-name>]-<msg-id>:<host>: */
-		snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%ld: ", QL_MSGHDR,
+		snprintf(pbuf, pbuf_size, "%s [%s]-%04x:%lu: ", QL_MSGHDR,
 			 dev_name(&(pdev->dev)), msg_id, vha->host_no);
 	} else {
 		/* <module-name> [<dev-name>]-<msg-id>: : */
Signature · 1 line
2.25.4

Looks good.

--
Himanshu Madhani Oracle Linux Engineering

#10 lore raw
In reply to Ye Bin

Ye,

Quoted 7 lines

Ye Bin (3):
scsi: qla2xxx: Fix inconsistent of format with argument type in
tcm_qla2xxx.c
scsi: qla2xxx: Fix inconsistent of format with argument type in
qla_os.c
scsi: qla2xxx: Fix inconsistent of format with argument type in
qla_dbg.c

Applied to 5.10/scsi-staging, thanks!

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#11 lore raw
In reply to Ye Bin
Quoted 9 lines · Ye Bin

Ye Bin (3):
scsi: qla2xxx: Fix inconsistent of format with argument type in
tcm_qla2xxx.c
scsi: qla2xxx: Fix inconsistent of format with argument type in
qla_os.c
scsi: qla2xxx: Fix inconsistent of format with argument type in
qla_dbg.c

[...]

Applied to 5.10/scsi-queue, thanks!

[1/3] scsi: qla2xxx: Fix inconsistent format argument type in tcm_qla2xxx.c

      https://git.kernel.org/mkp/scsi/c/7f5523f69709
[2/3] scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
      https://git.kernel.org/mkp/scsi/c/250bd00923c7
[3/3] scsi: qla2xxx: Fix inconsistent format argument type in qla_dbg.c
      https://git.kernel.org/mkp/scsi/c/72e813d9a1b7
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering