From patchwork Fri May 3 09:50:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuan-Wei Chiu X-Patchwork-Id: 13652547 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 65E01C4345F for ; Fri, 3 May 2024 09:50:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E6E7F6B0098; Fri, 3 May 2024 05:50:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1DE76B0099; Fri, 3 May 2024 05:50:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C98316B009A; Fri, 3 May 2024 05:50:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A87706B0098 for ; Fri, 3 May 2024 05:50:41 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 58770810B9 for ; Fri, 3 May 2024 09:50:41 +0000 (UTC) X-FDA: 82076615082.24.5D62900 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by imf11.hostedemail.com (Postfix) with ESMTP id AFF3140026 for ; Fri, 3 May 2024 09:50:34 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="f/ZMNsYF"; spf=pass (imf11.hostedemail.com: domain of visitorckw@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=visitorckw@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1714729834; 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=XbIFWMJbm46ABCEZghwIka4n+0EiK+K27u1UogEz3qM=; b=XbXhINRSDIIKuIOLjteNEYmgjhv4QOne4pe6G71JPibAttKPDTjGGBHH4GtPV74lE1n+wp E0WoufkRIXLf5ub5NDLSeuVD9RSNJ+b42x+xEI4jAwqjvzcMG14CcwG2DrF332K6cUuVK+ 4aZfoLPqN+/ot051MUcBqx3dCRp9C6o= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1714729834; a=rsa-sha256; cv=none; b=iTrVI9azxMzHfyAb5f5uRcyB6x6qnkKUHN/W9dUY1HXNsrA3n1vkgm90ILKYSt8Mem+tIh RriUdlLvxroMGNYEZpj2nOAqABjt7rkXkhlQv/tGs1eL8c5jR61UP2wVCcBslIteSp0ajK dYx/9FLzEcFRXOxSOo6Ya8CuHeFkiN4= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="f/ZMNsYF"; spf=pass (imf11.hostedemail.com: domain of visitorckw@gmail.com designates 209.85.214.171 as permitted sender) smtp.mailfrom=visitorckw@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1eca151075eso2796675ad.1 for ; Fri, 03 May 2024 02:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714729832; x=1715334632; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XbIFWMJbm46ABCEZghwIka4n+0EiK+K27u1UogEz3qM=; b=f/ZMNsYFQ2c44geZAjnLpsgaglcHyLYJEI5T+rOk4vNSY4mWNLxQOMDpWl8kwEpP9E MGP9odV52rc/XP4JKpb7ALgDfNDLwfaZUgmtdFp+miuZePtgwy5ynAQ1O9jYitm2OOiI D9UI+Y/alS7ID0YNVge7e0DBFm9/N7WBKuqjA6c089LJJMYsdIH313nzEiG2Slkdzd6w BwyUbUL7ZZxRMGGYiAmu+RSJ70XX/s+OzNIGOAF1SJula5DTsBOod7zVKn+2xZO7fMxK 8Q20mzbY3rCtlj0+d62CtXy/4wddO4oXqnKkEfnDjeEG39YgcKWzefR7/KQNjC6T8Goi yYJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714729832; x=1715334632; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XbIFWMJbm46ABCEZghwIka4n+0EiK+K27u1UogEz3qM=; b=Lz+3UIw6AZQ20fSxpX2h3fFUT6nz9z73+0HUo/9SEmyM71hQmsCpgdadyQpRNJu0ev 5OfcVLsbCY2k1sIA4G3zpiTljyUyrHIYibIRjjB7uY6SmcdwpuSJYYGelSwtQemSHN0T /O1YIqLhE2szqLil7NkGm5L3UeSbaReoAJ35CfU0UbDcZUZckXj96RqDTydUbqWXvPGe jl90LXLbUBScxpzU1NLCaZniPxWb5pKv/coj7ZtbNuGmwn22P9n/WSS/0RG6l5yRya5z V5/JCmro2YivAK50fpmi36sE9ny5Pe/p9KgX067J4IFjWMterUDNmp/aPzdoKPklIjSb zAWA== X-Forwarded-Encrypted: i=1; AJvYcCXS55bzRSP4FuaHFKGpudyJWW5BplGqlmWYmLLiIXhG73L7hXtfy/vdGOBj7N+sfD7IO+e8wuDtT2tk+1HHvjr+tcg= X-Gm-Message-State: AOJu0Yyq4Ol/tB9PSXoXqT4EHFERJIcsBHnlzx5W0Mfnwc+T7+ROdGRy CWKcBLEuvo7UDlZFiaMLbxiT8h1vYTxyTbVOYDeEafZq70cmnTdG X-Google-Smtp-Source: AGHT+IFrrnUeg1/9tnJoxphrYCutsVqK1aBW2OCIgiOzjy5644o7ZgXkmSsWe6YH7QgSl44ghsAr4Q== X-Received: by 2002:a05:6a20:914a:b0:1ad:8f18:8621 with SMTP id x10-20020a056a20914a00b001ad8f188621mr2584834pzc.6.1714729832416; Fri, 03 May 2024 02:50:32 -0700 (PDT) Received: from visitorckw-System-Product-Name.. ([140.113.216.168]) by smtp.gmail.com with ESMTPSA id x1-20020a170902ec8100b001eb3d459143sm2849758plg.48.2024.05.03.02.50.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:50:31 -0700 (PDT) From: Kuan-Wei Chiu To: akpm@linux-foundation.org, Liam.Howlett@oracle.com, nathan@kernel.org Cc: ndesaulniers@google.com, morbo@google.com, justinstitt@google.com, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, llvm@lists.linux.dev, jserv@ccns.ncku.edu.tw, Kuan-Wei Chiu Subject: [PATCH] maple_tree: Fix build failure with W=1 and LLVM=1 Date: Fri, 3 May 2024 17:50:27 +0800 Message-Id: <20240503095027.747838-1-visitorckw@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: uyo1xtoe7couw718iw4moyf9msj1kx5c X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: AFF3140026 X-HE-Tag: 1714729834-331795 X-HE-Meta: U2FsdGVkX1+dYJO4/HDH+Zw8WZW3egoasdixyRM5b6O1abL6tc1QXXohSKn4PWEtW0E2S9yofAp4zoXolDNF7MTCRa3JXIKJwCLvDyUHu61ouBlsAa69L+KFI/TlO5HBbDRXhBanIGE5S5xImEvs7wC3cP88tnIZlpIdDY0HZUoL69qu5mcPvt0jOmZjpV4LuIfRncywuqtagULDig03BT3Ugg7oIj7poh3Bgks0c1sax9ylqJMqDjh+dElgb7R+ECMGxg9pAuKxytcktDYo3FU+OgQLZ+xbnDJT23HEuosxgzKRtYhgVWilZWLQuRyxUsz8FYXmLaYAPg16sK5zJ6Cie6tr+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xpn+tD+PW0YsaDinEtdbiMcn5hFifdfUCU2OKrB/p3pdWT2P8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.215231, 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 compiling library code using "make W=1 LLVM=1 lib/", clang generated the following compilation errors: lib/maple_tree.c:351:21: error: unused function 'mte_set_full' [-Werror,-Wunused-function] 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] 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] static inline bool mte_has_null(const struct maple_enode *node) ^ 3 errors generated. Remove unused static inline functions to resolve compilation errors with clang. Signed-off-by: Kuan-Wei Chiu --- lib/maple_tree.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 55e1b35bf877..cd3f5399f9f3 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);