summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMathieu Malaterre <malat@debian.org>2018-06-08 03:05:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-09 13:20:25 +0300
commit4148e331c422900f63a7bb7ec2474663311ce921 (patch)
tree98d4d6b26a0ef5c9a3520331d28e73a016143aa2 /mm
parentf6581cff8a28891c64128e88db36f04a04be11ba (diff)
downloadlinux-4148e331c422900f63a7bb7ec2474663311ce921.tar.xz
mm/slub.c: add __printf verification to slab_err()
[ Upstream commit a38965bf941b7c2af50de09c96bc5f03e136caef ] __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/20180505200706.19986-1-malat@debian.org Signed-off-by: Mathieu Malaterre <malat@debian.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 332ce18463cb..70a9f027f963 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -636,7 +636,7 @@ static 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;