diff mbox series

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

Message ID 20200930022515.2862532-4-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 warning:
[drivers/scsi/qla2xxx/qla_dbg.c:2451]: (warning) %ld in format string (no. 4)
	requires 'long' but the argument type is 'unsigned long'.

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

Comments

Nilesh Javali Oct. 1, 2020, 11:05 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: [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'.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Ye Bin <yebin10@huawei.com>
> ---
>  drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
> index 1434789c9919..bb7431912d41 100644
> --- a/drivers/scsi/qla2xxx/qla_dbg.c
> +++ b/drivers/scsi/qla2xxx/qla_dbg.c
> @@ -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>: : */
> --
> 2.25.4

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