]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/mm-slub.c-add-__printf-verification-to-slab_err.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / mm-slub.c-add-__printf-verification-to-slab_err.patch
1 From foo@baz Sat Jul 28 10:25:26 CEST 2018
2 From: Mathieu Malaterre <malat@debian.org>
3 Date: Thu, 7 Jun 2018 17:05:17 -0700
4 Subject: mm/slub.c: add __printf verification to slab_err()
5
6 From: Mathieu Malaterre <malat@debian.org>
7
8 [ Upstream commit a38965bf941b7c2af50de09c96bc5f03e136caef ]
9
10 __printf is useful to verify format and arguments. Remove the following
11 warning (with W=1):
12
13 mm/slub.c:721:2: warning: function might be possible candidate for `gnu_printf' format attribute [-Wsuggest-attribute=format]
14
15 Link: http://lkml.kernel.org/r/20180505200706.19986-1-malat@debian.org
16 Signed-off-by: Mathieu Malaterre <malat@debian.org>
17 Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
18 Cc: Christoph Lameter <cl@linux.com>
19 Cc: Pekka Enberg <penberg@kernel.org>
20 Cc: David Rientjes <rientjes@google.com>
21 Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
22 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
23 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
24 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 ---
27 mm/slub.c | 2 +-
28 1 file changed, 1 insertion(+), 1 deletion(-)
29
30 --- a/mm/slub.c
31 +++ b/mm/slub.c
32 @@ -708,7 +708,7 @@ void object_err(struct kmem_cache *s, st
33 print_trailer(s, page, object);
34 }
35
36 -static void slab_err(struct kmem_cache *s, struct page *page,
37 +static __printf(3, 4) void slab_err(struct kmem_cache *s, struct page *page,
38 const char *fmt, ...)
39 {
40 va_list args;