LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] slub: add __printf verification to ‘slab_err’:
@ 2018-05-05 20:07 Mathieu Malaterre
  0 siblings, 0 replies; only message in thread
From: Mathieu Malaterre @ 2018-05-05 20:07 UTC (permalink / raw)
  To: Christoph Lameter
  Cc: Mathieu Malaterre, Pekka Enberg, David Rientjes, Joonsoo Kim,
	Andrew Morton, linux-mm, linux-kernel

__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]

Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
 mm/slub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/slub.c b/mm/slub.c
index 44aa7847324a..7d38cfb6a619 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;
-- 
2.11.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-05-05 20:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-05 20:07 [PATCH] slub: add __printf verification to ‘slab_err’: Mathieu Malaterre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).