From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9484E3A7858 for ; Thu, 16 Jul 2026 08:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784192289; cv=none; b=tsH2j5D65aIVYd5k/f8C6T9W6tON8YE00n/uXu+oHRaeH5+CTEHaESt0t7fObQPU6R4K0xGVNDoiawHJl7TabuAAz5KFGeaSwHK0DlJw8pOPg6C4hyMBj3z+2pDNNR/OGPrfctHiZ4egIntTsj0MNYIX8CL/ERRkZzC8aMDCFeg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784192289; c=relaxed/simple; bh=/RZDM8iUKy7i1EkhHwSkBs2bG9SpzOlgGGrAK2S7n2s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sZ1mOlXVMOdpjbcgt3decYYpRH4ztl94JsG1430Q3NY67dw0jQdhiYd8yH0VbfaNcI4E0RPsKnaX2620VrzE0AFrU9tfhn+DBrMd7TK6F3c7Gu0h9PjPPgXOtKP8hjJwfzQRn8hD43V8eZMLP+QYldxSegkx36+YIboF8+jHc2c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=keTmM0Ha; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="keTmM0Ha" Date: Thu, 16 Jul 2026 16:57:45 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784192274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=acmKjJ7fYBsJydzq9U/V0H7045qI0hL0ilTJJ+WwR0g=; b=keTmM0HaVUFt7vYtEp0fHL2W8JLxZk7zjs88vTcf/Yz4ooWXNI5KsoQY6s2B3KBl9+NeM6 pONG+4CVKBatcgBm+C9S38I9WSzUCtUsTTS618WCB47DBcDA6AcLYnvsFDhyRtQtJEq1le ixfce9rZrH5bYXzv9/g9IL305MzzX6w= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Baoquan He To: Hongfu Li 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 Subject: Re: [PATCH] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch Message-ID: References: <20260716085131.68378-1-hongfu.li@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260716085131.68378-1-hongfu.li@linux.dev> X-Migadu-Flow: FLOW_OUT On 07/16/26 at 04:51pm, Hongfu Li wrote: > From: Hongfu Li > > 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 > --- > 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 > { > return NULL; > } > -- > 2.54.0 >