From patchwork Tue Oct 8 19:13:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13826876 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9C65CEFC43 for ; Tue, 8 Oct 2024 19:13:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 43CF46B0089; Tue, 8 Oct 2024 15:13:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3EBB76B008A; Tue, 8 Oct 2024 15:13:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2DA286B008C; Tue, 8 Oct 2024 15:13:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 118526B0089 for ; Tue, 8 Oct 2024 15:13:39 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 4EBAF80B0B for ; Tue, 8 Oct 2024 19:13:37 +0000 (UTC) X-FDA: 82651384116.04.76F1482 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by imf20.hostedemail.com (Postfix) with ESMTP id E6F2C1C000B for ; Tue, 8 Oct 2024 19:13:35 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BtyOx2Zm; spf=none (imf20.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 198.175.65.17) smtp.mailfrom=andriy.shevchenko@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728414773; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=UKWZ3Yi3zyuF7UTpE7V0649tGjIBYyvULV494Rshcx8=; b=4sPXsjA7egyxmPP7fp0q/SPnmF7Z0DzmDVNYrPVaOAeW3tfztnpBkT3sXj7IA3hTqDbuGU WEpKyGxmsj0xquzBTd0LaE3Ff6aP/ritEE2X4UBPEdWt2wdtQqJWbwNsf0WarQ/LQX/Uf3 8qxomrS6UxG/q9KabJTl3U57QeKGx8U= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=BtyOx2Zm; spf=none (imf20.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 198.175.65.17) smtp.mailfrom=andriy.shevchenko@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728414773; a=rsa-sha256; cv=none; b=DjZmAtf3qKrsHNUD4p5ScDdX9WPDsGpu7uv7BZ9ryyEqeHG1+9xnYxrLVVaWZRi5CYac4s q25GlBQxC5gFvcFTBnl6Lc9b1i+2043QECmNoIfboZIVSYAJF3fPntGgJ/GDY8Fngqm+Hx eCjqtn5+7TJTGpojGD8hf/XxSPPGJb4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728414816; x=1759950816; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=VeyLd080XrjX7LmXYGJDGzbJ4zxukfOJSEDHc+Nkdlo=; b=BtyOx2Zmf33VGBDQ0iyOQjgyclBWSYp5CF5GAeUVUlHvYQLf8s65NfcU CWQlCx0ZgG4AmnQ1j4OOSBT5ybE3AGrYzxsLGmwXMwN4hFTf/ztKY1APm AmfTPtsD0Y5ub3hs30OEmRtlvAtDjytbGhHCi6P12UpWklBd3zyWhLUGv SuPIoRGvtu9N8CGZmFI7cW4pzLBuu0ui0tOzjQIokhGx/XL9XR5CRVkl1 doa95tdI1pqhoKaDQooJhCYvnmDBcu5DMBPoRwrEFbVVew//0uTz9Ctis lPiiy9r2sTxN0Yi7wejB7VvZOXodXSAf/b2sMx88yV+fEYVjNPcQqYj1k Q==; X-CSE-ConnectionGUID: EGesoRXJQyyvl52bo+Duug== X-CSE-MsgGUID: GSPO4Df4SfisyIAop3JLgA== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="27769471" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="27769471" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2024 12:13:34 -0700 X-CSE-ConnectionGUID: ulFTdNS7TKK9+EnYMVAMTA== X-CSE-MsgGUID: dkKWb7I+QEGNbOY65bYdOA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79925645" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 12:13:32 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id D9C1126B; Tue, 08 Oct 2024 22:13:30 +0300 (EEST) From: Andy Shevchenko To: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Chuanhua Han , Barry Song , Andy Shevchenko Subject: [PATCH v1 1/1] mm: Remove unused stub for can_swapin_thp() Date: Tue, 8 Oct 2024 22:13:29 +0300 Message-ID: <20241008191329.2332346-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: 4655zoeu8qg5g4zknnotruxnpfyum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Va/lENp35SXNaqCmKR5BxREJh9D4vpy4l9aICUMra2NDh7nEgKlyJcd9+r54RBm4Dm5B+h4tnSBaDLwGBEERz2QQaqQt+9NM5j9q39eiOyEzRpqaz8RMI2Waw7lf+JfYCEbgVjhxpIdHWxjdDGnjwTo2JsO0nKK69Q5puA41zPTESPddXO4fGc0neLc0GvHjfGOn5DCEzYLXoJPPpdF2g== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: When can_swapin_thp() is unused, it prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: mm/memory.c:4184:20: error: unused function 'can_swapin_thp' [-Werror,-Wunused-function] Fix this by removing the unused stub. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Fixes: 242d12c98174 ("mm: support large folios swap-in for sync io devices") Signed-off-by: Andy Shevchenko Acked-by: Barry Song --- mm/memory.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index 2366578015ad..c0869a962ddd 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4181,11 +4181,6 @@ static struct folio *alloc_swap_folio(struct vm_fault *vmf) return __alloc_swap_folio(vmf); } #else /* !CONFIG_TRANSPARENT_HUGEPAGE */ -static inline bool can_swapin_thp(struct vm_fault *vmf, pte_t *ptep, int nr_pages) -{ - return false; -} - static struct folio *alloc_swap_folio(struct vm_fault *vmf) { return __alloc_swap_folio(vmf);