diff options
author | Mathieu Malaterre <[email protected]> | 2018-06-07 17:05:17 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-06-07 17:34:34 -0700 |
commit | a38965bf941b7c2af50de09c96bc5f03e136caef (patch) | |
tree | d90f9ba3e14ac9827db7ea614f7e423a8c5fe2b1 | |
parent | 128227e7fe4087b60f1bd31f762e61237eb23790 (diff) |
mm/slub.c: add __printf verification to slab_err()
__printf is useful to verify format and arguments. Remove the following
warning (with W=1):
mm/slub.c:721:2: warning: function might be possible candidate for `gnu_printf' format attribute [-Wsuggest-attribute=format]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Mathieu Malaterre <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index dc960401ce90..ec5916483b07 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -711,7 +711,7 @@ void object_err(struct kmem_cache *s, struct page *page, print_trailer(s, page, object); } -static void slab_err(struct kmem_cache *s, struct page *page, +static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page, const char *fmt, ...) { va_list args; |