summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLucy Mielke <lucymielke@icloud.com>2023-10-06 22:30:51 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-10-18 23:34:18 +0200
commitf04eba134e598d4a5af2eeecff0562df5042cbfc (patch)
tree6cbe5ac96667aebc3b8b2d94fd7e311835d90074 /include
parentmm/thp: fix "mm: thp: kill __transhuge_page_enabled()" (diff)
downloadlinux-f04eba134e598d4a5af2eeecff0562df5042cbfc.tar.xz
linux-f04eba134e598d4a5af2eeecff0562df5042cbfc.zip
mm: add printf attribute to shrinker_debugfs_name_alloc
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] [akpm@linux-foundation.org: fix shrinker_alloc() as welll per Qi Zheng] Link: https://lkml.kernel.org/r/822387b7-4895-4e64-5806-0f56b5d6c447@bytedance.com Link: https://lkml.kernel.org/r/ZSBue-3kM6gI6jCr@mainframe Fixes: c42d50aefd17 ("mm: shrinker: add infrastructure for dynamically allocating shrinker") Signed-off-by: Lucy Mielke <lucymielke@icloud.com> Cc: Qi Zheng <zhengqi.arch@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/shrinker.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/shrinker.h b/include/linux/shrinker.h
index e4f93120e0ab..1a00be90d93a 100644
--- a/include/linux/shrinker.h
+++ b/include/linux/shrinker.h
@@ -131,6 +131,7 @@ struct shrinker {
*/
#define SHRINKER_NONSLAB BIT(4)
+__printf(2, 3)
struct shrinker *shrinker_alloc(unsigned int flags, const char *fmt, ...);
void shrinker_register(struct shrinker *shrinker);
void shrinker_free(struct shrinker *shrinker);