2021-03-17 09:13:23

by Lee Jones

[permalink] [raw]
Subject: [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()

Fixes the following W=1 kernel build warning(s):

In file included from drivers/scsi/BusLogic.c:51:
drivers/scsi/BusLogic.c: In function ‘blogic_msg’:
drivers/scsi/BusLogic.c:3591:2: warning: function ‘blogic_msg’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Cc: Khalid Aziz <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: "Leonard N. Zubkoff" <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/scsi/BusLogic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index ccb061ab0a0ad..0ac3f713fc212 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -3578,7 +3578,7 @@ Target Requested Completed Requested Completed Requested Completed\n\
/*
blogic_msg prints Driver Messages.
*/
-
+__printf(2, 4)
static void blogic_msg(enum blogic_msglevel msglevel, char *fmt,
struct blogic_adapter *adapter, ...)
{
--
2.27.0


2021-03-17 17:23:40

by Khalid Aziz

[permalink] [raw]
Subject: Re: [PATCH 1/8] scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()

On 3/17/21 3:11 AM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> In file included from drivers/scsi/BusLogic.c:51:
> drivers/scsi/BusLogic.c: In function ‘blogic_msg’:
> drivers/scsi/BusLogic.c:3591:2: warning: function ‘blogic_msg’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>
> Cc: Khalid Aziz <[email protected]>
> Cc: "James E.J. Bottomley" <[email protected]>
> Cc: "Martin K. Petersen" <[email protected]>
> Cc: "Leonard N. Zubkoff" <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/scsi/BusLogic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index ccb061ab0a0ad..0ac3f713fc212 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -3578,7 +3578,7 @@ Target Requested Completed Requested Completed Requested Completed\n\
> /*
> blogic_msg prints Driver Messages.
> */
> -
> +__printf(2, 4)
> static void blogic_msg(enum blogic_msglevel msglevel, char *fmt,
> struct blogic_adapter *adapter, ...)
> {
>

Acked-by: Khalid Aziz <[email protected]>