diff mbox series

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

Message ID 20210317091125.2910058-2-lee.jones@linaro.org
State New
Headers show
Series Rid W=1 warnings in SCSI | expand

Commit Message

Lee Jones March 17, 2021, 9:11 a.m. UTC
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 <khalid@gonehiking.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/scsi/BusLogic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.27.0

Comments

Khalid Aziz March 17, 2021, 5:01 p.m. UTC | #1
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 <khalid@gonehiking.org>

> Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>

> Cc: "Martin K. Petersen" <martin.petersen@oracle.com>

> Cc: "Leonard N. Zubkoff" <lnz@dandelion.com>

> Cc: linux-scsi@vger.kernel.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

> ---

>  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 <khalid@gonehiking.org>
diff mbox series

Patch

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, ...)
 {