LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] driver core: add __printf verification to device_create_groups_vargs
@ 2018-05-05 19:57 Mathieu Malaterre
  0 siblings, 0 replies; only message in thread
From: Mathieu Malaterre @ 2018-05-05 19:57 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Mathieu Malaterre, linux-kernel

__printf is useful to verify format and arguments. Remove the following
warning (with W=1):

  drivers/base/core.c:2435:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index b610816eb887..357e774ba13b 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2406,7 +2406,7 @@ static void device_create_release(struct device *dev)
 	kfree(dev);
 }
 
-static struct device *
+static __printf(6, 0) struct device *
 device_create_groups_vargs(struct class *class, struct device *parent,
 			   dev_t devt, void *drvdata,
 			   const struct attribute_group **groups,
-- 
2.11.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-05 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 19:57 [PATCH] driver core: add __printf verification to device_create_groups_vargs Mathieu Malaterre

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).