]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
driver core: add __printf verification to device_create_groups_vargs
authorMathieu Malaterre <malat@debian.org>
Sat, 5 May 2018 19:57:41 +0000 (21:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 May 2018 14:59:21 +0000 (16:59 +0200)
__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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c

index c4fc083870c25a56e1a85112ecc311fcbbc3d882..35221144e0e67bd1e9210f224dfcfde28fcc630c 100644 (file)
@@ -2411,7 +2411,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,