All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <baoquan.he@linux.dev>
To: Hongfu Li <hongfu.li@linux.dev>
Cc: akpm@linux-foundation.org, chrisl@kernel.org, kasong@tencent.com,
	shikemeng@huaweicloud.com, nphamcs@gmail.com, baohua@kernel.org,
	youngjun.park@lge.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Hongfu Li <lihongfu@kylinos.cn>
Subject: Re: [PATCH] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch
Date: Thu, 16 Jul 2026 16:57:45 +0800	[thread overview]
Message-ID: <alidCVozQpCiiLxV@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20260716085131.68378-1-hongfu.li@linux.dev>

On 07/16/26 at 04:51pm, Hongfu Li wrote:
> From: Hongfu Li <lihongfu@kylinos.cn>
> 
> The !CONFIG_SWAP stub for swap_cluster_lock() has mismatched prototype:
> it has an extra unused irq argument and uses pgoff_t instead of unsigned
> long for offset. All callers are under CONFIG_SWAP so the extra parameter
> is dead.
> 
> Sync the stub signature with the real function.
> 
> Fixes: 8578e0c00dcf ("mm, swap: use the swap table for the swap cache and switch API")
> Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
> ---
>  mm/swap.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/swap.h b/mm/swap.h
> index 77d2d14eda42..2c4667662601 100644
> --- a/mm/swap.h
> +++ b/mm/swap.h
> @@ -337,7 +337,7 @@ static inline unsigned int folio_swap_flags(struct folio *folio)
>  #else /* CONFIG_SWAP */
>  struct swap_iocb;
>  static inline struct swap_cluster_info *swap_cluster_lock(
> -	struct swap_info_struct *si, pgoff_t offset, bool irq)
> +		struct swap_info_struct *si, unsigned long offset)

Good catch.

Reviewed-by: Baoquan He <baoquan.he@linux.dev>

>  {
>  	return NULL;
>  }
> -- 
> 2.54.0
> 

  reply	other threads:[~2026-07-16  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16  8:51 [PATCH] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch Hongfu Li
2026-07-16  8:57 ` Baoquan He [this message]
2026-07-16  9:47 ` Kairui Song
2026-07-16 12:44   ` Hongfu Li

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=alidCVozQpCiiLxV@MiWiFi-R3L-srv \
    --to=baoquan.he@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=chrisl@kernel.org \
    --cc=hongfu.li@linux.dev \
    --cc=kasong@tencent.com \
    --cc=lihongfu@kylinos.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nphamcs@gmail.com \
    --cc=shikemeng@huaweicloud.com \
    --cc=youngjun.park@lge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.