From: Lucy Mielke <lucymielke@icloud.com>
To: akpm@linux-foundation.org, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] mm: add printf attribute to shrinker_debugfs_name_alloc
Date: Fri, 6 Oct 2023 22:30:51 +0200 [thread overview]
Message-ID: <ZSBue-3kM6gI6jCr@mainframe> (raw)
This fixes a compiler warning when compiling an allyesconfig with W=1:
mm/internal.h:1235:9: error: function might be a candidate for ‘gnu_printf’
format attribute [-Werror=suggest-attribute=format]
Signed-off-by: Lucy Mielke <lucymielke@icloud.com>
---
mm/internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h
index 18e360fa53bc..e23f1ea55a8e 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1229,8 +1229,8 @@ unsigned long shrink_slab(gfp_t gfp_mask, int nid, struct mem_cgroup *memcg,
int priority);
#ifdef CONFIG_SHRINKER_DEBUG
-static inline int shrinker_debugfs_name_alloc(struct shrinker *shrinker,
- const char *fmt, va_list ap)
+static inline __printf(2, 0) int shrinker_debugfs_name_alloc(
+ struct shrinker *shrinker, const char *fmt, va_list ap)
{
shrinker->name = kvasprintf_const(GFP_KERNEL, fmt, ap);
--
2.42.0
next reply other threads:[~2023-10-06 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 20:30 Lucy Mielke [this message]
2023-10-10 0:50 ` [PATCH] mm: add printf attribute to shrinker_debugfs_name_alloc Andrew Morton
2023-10-10 2:26 ` Qi Zheng
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=ZSBue-3kM6gI6jCr@mainframe \
--to=lucymielke@icloud.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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: link
Be 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.