From: Mathieu Malaterre <malat@debian.org> To: Christoph Lameter <cl@linux.com> Cc: Mathieu Malaterre <malat@debian.org>, Pekka Enberg <penberg@kernel.org>, David Rientjes <rientjes@google.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] slub: add __printf verification to ‘slab_err’: Date: Sat, 5 May 2018 22:07:05 +0200 [thread overview] Message-ID: <20180505200706.19986-1-malat@debian.org> (raw) __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
WARNING: multiple messages have this Message-ID (diff)
From: Mathieu Malaterre <malat@debian.org> To: Christoph Lameter <cl@linux.com> Cc: Mathieu Malaterre <malat@debian.org>, Pekka Enberg <penberg@kernel.org>, David Rientjes <rientjes@google.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] slub: add __printf verification to ‘slab_err’: Date: Sat, 5 May 2018 22:07:05 +0200 [thread overview] Message-ID: <20180505200706.19986-1-malat@debian.org> (raw) __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 a??gnu_printfa?? 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
next reply other threads:[~2018-05-05 20:07 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-05-05 20:07 Mathieu Malaterre [this message] 2018-05-05 20:07 ` [PATCH] slub: add __printf verification to ‘slab_err’: Mathieu Malaterre
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180505200706.19986-1-malat@debian.org \ --to=malat@debian.org \ --cc=akpm@linux-foundation.org \ --cc=cl@linux.com \ --cc=iamjoonsoo.kim@lge.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=penberg@kernel.org \ --cc=rientjes@google.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.