[PATCH 15/40] scsi: lpfc: lpfc_init: Use __printf() format notation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
 | ^~~~~~

Cc: James Smart <james.smart@xxxxxxxxxxxx>
Cc: Dick Kennedy <dick.kennedy@xxxxxxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
 drivers/scsi/lpfc/lpfc_init.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 20edf001fdd97..ccfae1c0c0963 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -14187,6 +14187,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;
-- 
2.25.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux