scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg()
authorLee Jones <lee.jones@linaro.org>
Wed, 17 Mar 2021 09:11:18 +0000 (09:11 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Mar 2021 02:52:29 +0000 (22:52 -0400)
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]

Link: https://lore.kernel.org/r/20210317091125.2910058-2-lee.jones@linaro.org
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
Acked-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/BusLogic.c

index ccb061a..0ac3f71 100644 (file)
@@ -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, ...)
 {