Skip to content

Commit 0d74d87

Browse files
malaterrehtejun
authored andcommitted
driver core: add __printf verification to __ata_ehi_pushv_desc
__printf is useful to verify format and arguments. Remove the following warning (with W=1): drivers/ata/libata-eh.c:183:10: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Signed-off-by: Mathieu Malaterre <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 7e437d6 commit 0d74d87

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ata/libata-eh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
175175
{ }
176176
#endif /* CONFIG_PM */
177177

178-
static void __ata_ehi_pushv_desc(struct ata_eh_info *ehi, const char *fmt,
179-
va_list args)
178+
static __printf(2, 0) void __ata_ehi_pushv_desc(struct ata_eh_info *ehi,
179+
const char *fmt, va_list args)
180180
{
181181
ehi->desc_len += vscnprintf(ehi->desc + ehi->desc_len,
182182
ATA_EH_DESC_LEN - ehi->desc_len,

0 commit comments

Comments
 (0)