From patchwork Fri Sep 6 15:05:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13794332 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 522A5CE7B1D for ; Fri, 6 Sep 2024 15:05:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7B43A6B0083; Fri, 6 Sep 2024 11:05:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 763616B0085; Fri, 6 Sep 2024 11:05:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6526D6B0088; Fri, 6 Sep 2024 11:05:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 43C026B0083 for ; Fri, 6 Sep 2024 11:05:43 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D671AA775D for ; Fri, 6 Sep 2024 15:05:42 +0000 (UTC) X-FDA: 82534637724.15.CA0E4EB Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by imf02.hostedemail.com (Postfix) with ESMTP id 3D59580014 for ; Fri, 6 Sep 2024 15:05:40 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jiLgwnq5; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf02.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 192.198.163.13) smtp.mailfrom=andriy.shevchenko@linux.intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725635068; a=rsa-sha256; cv=none; b=LOYmDhgAiSl8iAaFAHCKj/WsOTbVVdEH1SUCU2fC5VM+Si2mYzD6Wxk/VZqWeQmJ0G2AcA VEgDDvXHObPaLSA4F7/SSuHMVLdo0wnB9ferlC2CAqVKL1MquPiw3EOtXyD5Fb3wTZgaFo QtZVCTlsEcTK9szvR+aM609Px0P5v/8= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=jiLgwnq5; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf02.hostedemail.com: domain of andriy.shevchenko@linux.intel.com has no SPF policy when checking 192.198.163.13) smtp.mailfrom=andriy.shevchenko@linux.intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725635068; 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=s73ItkVH/iqaivS0XyiKVTcUOgqkMfko8j0XaRkAOpw=; b=NzKHi1IHwTYCs0t9JIX7C5U9vZ34LW9I9woMQRx6tKH6+qQPJTRJlQFkMpaeI9Lp1dDv2O jhu+KYZbQrXEz77XgatfsQ3qiRGsTjU5g+7+4IgHiCnypfIz0AWx2wDi5QcLYn43QAKxga PK8hao+7gCy7jiKWXOheUcaj8FGFQmU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725635140; x=1757171140; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6UvkPauj8ELcrdIfoXv9+128GHjrOlHpvqYEJldyrq8=; b=jiLgwnq5FtnO3dOs0DRcGkAGsxkziB7oQFrgb+WH/M3WLZtgrNLIFvks S9w+WwgYRUUz/FSAIxCuT+0NR9O0lNjtubwDpnwFo0tXxNiqW+y4sYS5L LqVURlMVROtBpNH3qfFYJaN4RD9927FTTS5+oVfwUV2y1mfIebdtRJlUa YSnpw6GNK4o1vsZmFESpximiwqAx5FprGibXdye3l9B8REqlM2dU05Q5W ju2aDsIcx2NaKCGY9/WlWWToPLUDo/nwwerTQ6uxVn9GdIf2dzmRsUIH4 AUX7jAMo46f4RGrK5nWT4gF/E8ZyK3KUc58F/SzzmIYmok4hJnyTb9dEj g==; X-CSE-ConnectionGUID: OBgl0/uGTpiiiQ6Cr0qFGQ== X-CSE-MsgGUID: WYKAKKK/TNK4g9TBn9vsGg== X-IronPort-AV: E=McAfee;i="6700,10204,11187"; a="27322419" X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="27322419" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 08:05:38 -0700 X-CSE-ConnectionGUID: 1qsvXPyESNCCCs30gWg0SQ== X-CSE-MsgGUID: p3OGA9HpQGaybT1wEsCD/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="66727029" Received: from black.fi.intel.com ([10.237.72.28]) by orviesa008.jf.intel.com with ESMTP; 06 Sep 2024 08:05:36 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id B942213E; Fri, 06 Sep 2024 18:05:34 +0300 (EEST) From: Andy Shevchenko To: Andrew Morton , "Liam R. Howlett" , maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Andy Shevchenko Subject: [PATCH v1 1/1] maple_tree: Drop unused functions to fix the build Date: Fri, 6 Sep 2024 18:05:33 +0300 Message-ID: <20240906150533.568994-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1336.g36b5255a03ac MIME-Version: 1.0 X-Rspamd-Queue-Id: 3D59580014 X-Rspam-User: X-Rspamd-Server: rspam05 X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xdSpNteCHC1sNmkl0dXJgPHm39ljMXNFe7usdoYB+HSN7QpSy3re60dXNZrDC/O5A7JVtsF06b3qxcFimcfNn7FTtfMqABrRZKC30i5Lgcund0c1wYGNp2r56msZReQAmkf3G5so9GpFofJEu1Q3WZBuPDQURU67rKh602OmT0mPgxut5qOIdBjGyPRmnhXEnA1zIcfMn7crY41hbQ== 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: A few functions defined but not used. This, in particular, prevents kernel builds with clang, `make W=1` and CONFIG_WERROR=y: lib/maple_tree.c:351:21: error: unused function 'mte_set_full' [-Werror,-Wunused-function] 351 | static inline void *mte_set_full(const struct maple_enode *node) | ^~~~~~~~~~~~ lib/maple_tree.c:356:21: error: unused function 'mte_clear_full' [-Werror,-Wunused-function] 356 | static inline void *mte_clear_full(const struct maple_enode *node) | ^~~~~~~~~~~~~~ lib/maple_tree.c:361:20: error: unused function 'mte_has_null' [-Werror,-Wunused-function] 361 | static inline bool mte_has_null(const struct maple_enode *node) | ^~~~~~~~~~~~ Fix this by dropping unused functions. See also commit 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build"). Fixes: 6e7ba8b5e238 ("maple_tree: mte_set_full() and mte_clear_full() clang-analyzer clean up") Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Andy Shevchenko --- lib/maple_tree.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index aa3a5df15b8e..f7601aa470e0 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -348,21 +348,6 @@ static inline void *mte_safe_root(const struct maple_enode *node) return (void *)((unsigned long)node & ~MAPLE_ROOT_NODE); } -static inline void *mte_set_full(const struct maple_enode *node) -{ - return (void *)((unsigned long)node & ~MAPLE_ENODE_NULL); -} - -static inline void *mte_clear_full(const struct maple_enode *node) -{ - return (void *)((unsigned long)node | MAPLE_ENODE_NULL); -} - -static inline bool mte_has_null(const struct maple_enode *node) -{ - return (unsigned long)node & MAPLE_ENODE_NULL; -} - static __always_inline bool ma_is_root(struct maple_node *node) { return ((unsigned long)node->parent & MA_ROOT_PARENT);