From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-184.mta0.migadu.com (out-184.mta0.migadu.com [91.218.175.184]) (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 123C733A70E for ; Fri, 17 Jul 2026 07:11:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.184 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784272300; cv=none; b=SLdIChoNdq6llhoUOXPQLOlkL5M/9mOc6BlV1QIIDJ/5fK+Xd0Vz9KGsc3/HYh6KSybnEYnn2Fn3owWZzyk/avIdlUNYWdWRVxsuENRc6HgoYXZinKJLg8hX321JnYjToVifoOeomyRh241s1yLvDU8fhzoesTPfAr7Ks+c7krs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784272300; c=relaxed/simple; bh=jqfJgr3gNw+bonXuLy+KRyh/V+DEHN4SyAVjoJtJwp8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PBKuEAqTWr4wqAfx6N68yl3ZYl9XDPSQBD3J/0CiQkihN/LGkKQR5/XqMkSKSVEYOG8GBzziy8uBQb/cCgimGvdU3uQU/EwwCEz+/CPkhcUP9aA+6CknhpRYdVbY8AFhecGMK1xYDXsJrlw2Di8k3n/mzlv2AuQ1m8fFHFBXWSY= 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=TtyK9amO; arc=none smtp.client-ip=91.218.175.184 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="TtyK9amO" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784272296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=kRja4aDlEGiiIQuTIJfrSCAb+ZicMh3kvGxb3+bkSi8=; b=TtyK9amOGWVxYf0MrPrrpAXP4jz/nVlsU5MqbHcDMUitw5Wo8spvtI7zbt3YHooV1T2y8U Gqyv9E6b9GFlbL3rbUcI5070oV5k6RB0G/BqosOOXTM5NtyempSrPqDQOY8Wge2bViEDfJ orTsOkQ0On3bG9M1uqQOpujTxAWMw4s= From: Hongfu Li To: akpm@linux-foundation.org, chrisl@kernel.org, kasong@tencent.com, shikemeng@huaweicloud.com, nphamcs@gmail.com, baoquan.he@linux.dev, baohua@kernel.org, youngjun.park@lge.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, hongfu.li@linux.dev, Hongfu Li Subject: [PATCH v2] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch Date: Fri, 17 Jul 2026 15:11:04 +0800 Message-ID: <20260717071104.73467-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-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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. Delete the unused stub function entirely. Signed-off-by: Hongfu Li Reviewed-by: Baoquan He --- v2: - Drop the stub entirely instead of fixing its signature. All callers are under CONFIG_SWAP, so the stub is dead code. (Suggested by Kairui Song) - Add Reviewed-by tag - Update commit message --- mm/swap.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mm/swap.h b/mm/swap.h index 77d2d14eda42..d7834888e0d2 100644 --- a/mm/swap.h +++ b/mm/swap.h @@ -336,12 +336,6 @@ 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) -{ - return NULL; -} - static inline struct swap_cluster_info *swap_cluster_get_and_lock( struct folio *folio) { -- 2.54.0