From: Lee Jones Date: Thu, 23 Jul 2020 12:24:21 +0000 (+0100) Subject: scsi: lpfc: Use __printf() format notation X-Git-Tag: v5.9-rc1~116^2~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7fa03c77cd54e1ff8fc58bb85f787ff67910ec48;p=thirdparty%2Fkernel%2Flinux.git scsi: lpfc: Use __printf() format notation Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_init.c: In function ‘lpfc_dbg_print’: drivers/scsi/lpfc/lpfc_init.c:14212:6: warning: function ‘lpfc_dbg_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 14212 | sizeof(phba->dbg_log[idx].log), fmt, args); | ^~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-16-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index e369ba9611c54..50721dbc0268a 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -14186,6 +14186,7 @@ void lpfc_dmp_dbg(struct lpfc_hba *phba) atomic_set(&phba->dbg_log_dmping, 0); } +__printf(2, 3) void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...) { unsigned int idx;