diff mbox series

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

Message ID 20200930022515.2862532-2-yebin10@huawei.com (mailing list archive)
State Accepted
Headers show
Series Fix inconsistent of format with argument type | expand

Commit Message

yebin (H) Sept. 30, 2020, 2:25 a.m. UTC
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'.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nilesh Javali Oct. 1, 2020, 11:03 a.m. UTC | #1
> -----Original Message-----
> From: Ye Bin <yebin10@huawei.com>
> Sent: Wednesday, September 30, 2020 7:55 AM
> To: Nilesh Javali <njavali@marvell.com>; GR-QLogic-Storage-Upstream <GR-
> QLogic-Storage-Upstream@marvell.com>; linux-scsi@vger.kernel.org
> Cc: Ye Bin <yebin10@huawei.com>; Hulk Robot <hulkci@huawei.com>
> 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'.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
>  drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index 44bfe162654a..61017acd3458 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -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(
> 	\
> --
> 2.25.4

Ye Bin,
Thanks for the patches.

Reviewed-by: Nilesh Javali <njavali@marvell.com>
Himanshu Madhani Oct. 1, 2020, 4:47 p.m. UTC | #2
> On Sep 29, 2020, at 9:25 PM, Ye Bin <yebin10@huawei.com> wrote:
> 
> 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'.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
> drivers/scsi/qla2xxx/tcm_qla2xxx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index 44bfe162654a..61017acd3458 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -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(			\
> -- 
> 2.25.4
> 

Looks good.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 44bfe162654a..61017acd3458 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -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(			\