Skip to content

Commit

Permalink
driver core: add __printf verification to device_create_groups_vargs
Browse files Browse the repository at this point in the history
__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>
  • Loading branch information
Mathieu Malaterre authored and Greg Kroah-Hartman committed May 14, 2018
1 parent 085aa2d commit 6a8b55d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6a8b55d

Please sign in to comment.