linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Lucy Mielke <lucymielke@icloud.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Qi Zheng <zhengqi.arch@bytedance.com>
Subject: Re: [PATCH] mm: add printf attribute to shrinker_debugfs_name_alloc
Date: Mon, 9 Oct 2023 17:50:06 -0700	[thread overview]
Message-ID: <20231009175006.326e61e6c0e46e6ce78699ff@linux-foundation.org> (raw)
In-Reply-To: <ZSBue-3kM6gI6jCr@mainframe>

On Fri, 6 Oct 2023 22:30:51 +0200 Lucy Mielke <lucymielke@icloud.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


  reply	other threads:[~2023-10-10  0:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 20:30 [PATCH] mm: add printf attribute to shrinker_debugfs_name_alloc Lucy Mielke
2023-10-10  0:50 ` Andrew Morton [this message]
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=20231009175006.326e61e6c0e46e6ce78699ff@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lucymielke@icloud.com \
    --cc=zhengqi.arch@bytedance.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).