[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 9 Oct 2023 17:50:06 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Lucy Mielke <lucymielke@...oud.com>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Qi Zheng <zhengqi.arch@...edance.com>
Subject: Re: [PATCH] mm: add printf attribute to shrinker_debugfs_name_alloc
On Fri, 6 Oct 2023 22:30:51 +0200 Lucy Mielke <lucymielke@...oud.com> wrote:
> 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]
Thanks. I added
Fixes: c42d50aefd17 ("mm: shrinker: add infrastructure for dynamically allocating shrinker")
to this.
> --- 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
Powered by blists - more mailing lists