scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message()
authorLee Jones <lee.jones@linaro.org>
Wed, 17 Mar 2021 09:11:19 +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):

 drivers/scsi/nsp32.c: In function ‘nsp32_message’:
 drivers/scsi/nsp32.c:318:2: warning: function ‘nsp32_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Link: https://lore.kernel.org/r/20210317091125.2910058-3-lee.jones@linaro.org
Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: gotom@debian.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/nsp32.c

index e44b1a0..d5aa96f 100644 (file)
@@ -309,6 +309,7 @@ static struct scsi_host_template nsp32_template = {
 
 #define NSP32_DEBUG_BUF_LEN            100
 
+__printf(4, 5)
 static void nsp32_message(const char *func, int line, char *type, char *fmt, ...)
 {
        va_list args;