linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: Baoquan He <bhe@redhat.com>
Cc: SeongJae Park <sj@kernel.org>, kernel test robot <lkp@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Kemeng Shi <shikemeng@huaweicloud.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Tim Chen <tim.c.chen@linux.intel.com>
Subject: Re: [linux-next:master 1753/1936] mm/swapfile.c:1517:20: warning: function 'swap_is_last_ref' is not needed and will not be emitted
Date: Wed,  9 Apr 2025 17:26:27 -0700	[thread overview]
Message-ID: <20250410002628.7927-1-sj@kernel.org> (raw)
In-Reply-To: <Z/b4mdaNvhdg7FJD@MiWiFi-R3L-srv>

Hi Baoquan,

On Thu, 10 Apr 2025 06:45:45 +0800 Baoquan He <bhe@redhat.com> wrote:

[...]
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 2887ed5d34cc..08b52346cc39 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -1539,7 +1539,7 @@ static bool swap_entries_put_map_nr(struct swap_info_struct *si,
>   * Drop the last ref(1, SWAP_HAS_CACHE or SWAP_MAP_SHMEM) of swap entries,
>   * caller have to ensure all entries belong to the same cgroup and cluster.
>   */
> -static inline bool swap_is_last_ref(unsigned char count)
> +static inline bool __maybe_unused swap_is_last_ref(unsigned char count)
>  {
>  	return (count == SWAP_HAS_CACHE) || (count == 1) ||
>  	       (count == SWAP_MAP_SHMEM);

I confirmed that this fixes my !CONFIG_DEBUG_VM case build failure on the
latest mm-new.  Thank you for quickly sharing your thought and this fix.


Thanks,
SJ


  reply	other threads:[~2025-04-10  0:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 10:06 kernel test robot
2025-04-09  0:39 ` Andrew Morton
2025-04-09  2:24   ` Baoquan He
2025-04-09  6:25   ` Kemeng Shi
2025-04-09 16:54   ` SeongJae Park
2025-04-09 22:45     ` Baoquan He
2025-04-10  0:26       ` SeongJae Park [this message]
2025-04-13  2:47       ` Li, Philip
2025-04-10  0:42     ` Andrew Morton
2025-04-10  6:34       ` Kemeng Shi

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=20250410002628.7927-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=shikemeng@huaweicloud.com \
    --cc=tim.c.chen@linux.intel.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