Skip to content

Commit 6a8b55d

Browse files
malaterregregkh
authored andcommitted
driver core: add __printf verification to device_create_groups_vargs
__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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 085aa2d commit 6a8b55d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ static void device_create_release(struct device *dev)
24112411
kfree(dev);
24122412
}
24132413

2414-
static struct device *
2414+
static __printf(6, 0) struct device *
24152415
device_create_groups_vargs(struct class *class, struct device *parent,
24162416
dev_t devt, void *drvdata,
24172417
const struct attribute_group **groups,

0 commit comments

Comments
 (0)