* [PATCH] driver core: add __printf verification to __ata_ehi_pushv_desc
@ 2018-05-05 20:00 Mathieu Malaterre
2018-05-07 15:32 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Malaterre @ 2018-05-05 20:00 UTC (permalink / raw)
To: Tejun Heo; +Cc: Mathieu Malaterre, linux-ide, linux-kernel
__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 <malat@debian.org>
---
drivers/ata/libata-eh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c016829a38fd..513b260bcff1 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -175,8 +175,8 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
{ }
#endif /* CONFIG_PM */
-static void __ata_ehi_pushv_desc(struct ata_eh_info *ehi, const char *fmt,
- va_list args)
+static __printf(2, 0) void __ata_ehi_pushv_desc(struct ata_eh_info *ehi,
+ const char *fmt, va_list args)
{
ehi->desc_len += vscnprintf(ehi->desc + ehi->desc_len,
ATA_EH_DESC_LEN - ehi->desc_len,
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] driver core: add __printf verification to __ata_ehi_pushv_desc
2018-05-05 20:00 [PATCH] driver core: add __printf verification to __ata_ehi_pushv_desc Mathieu Malaterre
@ 2018-05-07 15:32 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2018-05-07 15:32 UTC (permalink / raw)
To: Mathieu Malaterre; +Cc: linux-ide, linux-kernel
On Sat, May 05, 2018 at 10:00:37PM +0200, Mathieu Malaterre wrote:
> __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 <malat@debian.org>
Applied to libata/for-4.17-fixes.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-05-07 15:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 20:00 [PATCH] driver core: add __printf verification to __ata_ehi_pushv_desc Mathieu Malaterre
2018-05-07 15:32 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).