linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Kemeng Shi <shikemeng@huaweicloud.com>,
	akpm@linux-foundation.org, kasong@tencent.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: swap: fix build warning when CONFIG_SWAP is not set
Date: Wed, 26 Feb 2025 16:35:11 +0100	[thread overview]
Message-ID: <3d372e93-599b-4072-955c-44c98eca469f@redhat.com> (raw)
In-Reply-To: <20250226182511.592796-1-shikemeng@huaweicloud.com>

On 26.02.25 19:25, Kemeng Shi wrote:
> Fix build warning that folio_alloc_swap is defined but not used when
> CONFIG_SWAP is not set.
> 
> Fixes: b79768ab943cf ("mm, swap: simplify folio swap allocation")

Not a stable commit id from upstream / mm-stable, so this should be 
squashed into the original commit.

> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
> ---
>   include/linux/swap.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 3a68da686c4e..d1f5414ea537 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -587,7 +587,7 @@ static inline int swp_swapcount(swp_entry_t entry)
>   	return 0;
>   }
>   
> -static int folio_alloc_swap(struct folio *folio, gfp_t gfp_mask)
> +static inline int folio_alloc_swap(struct folio *folio, gfp_t gfp_mask)
>   {
>   	return -EINVAL;
>   }

LGTM

-- 
Cheers,

David / dhildenb



      reply	other threads:[~2025-02-26 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-26 18:25 Kemeng Shi
2025-02-26 15:35 ` David Hildenbrand [this message]

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=3d372e93-599b-4072-955c-44c98eca469f@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shikemeng@huaweicloud.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