From patchwork Wed Jan 18 11:37:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 45201 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2304659wrn; Wed, 18 Jan 2023 04:20:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXuo8p3a2xV34KvI9ipNZrvo8ejWOy1NDNdTt5vRH1HhBStlkTC1hO/78qXkGvoy4tqYJKXL X-Received: by 2002:a17:907:a586:b0:86a:316:d107 with SMTP id vs6-20020a170907a58600b0086a0316d107mr7424167ejc.72.1674044405284; Wed, 18 Jan 2023 04:20:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674044405; cv=none; d=google.com; s=arc-20160816; b=irOysUDgIzasLr13ZHycfS1dKXJa2LrDP6cx86M5yog1GARptTBl+KjzD4a5V1wpHT Srgvk0UABWzQXkpXzLwMu4nQkM4hLM5jtDwIFvXGFEz2DRkSHqf1IZKzXgNRgIifbmKi 3ZafmpCgUbSN88A9z8GIeRJE7BxsYHAOXIsr786RkUXh/DD8eNnBr/JV/JAILvS2KvFA +gXvHwmKw84Oo4LUgF2Oew2K3lc9SyQGdodZriTkwP3aFOufVQh/7+pEy+nwmm9NbRJ7 1s6pX0p4uUfZvd2nDSaRqTxBaZgwmB6hEvtTLBG+eVvvF0aiceFR81PRrhaoAmA1ki9i 7/AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=63lJr1yEgRpYUaExnMPTyCaaSKYJEew65NbcNPhxgtk=; b=FTM+rsEK7Dvtf7z5zfrU0q6nDcrZxKjZWOOicApl+/dNSSZOaED98lO3GWIIv4jTow gpXw7Ti6+JUrvxyl4kWw+IuJmfM8SAp+3K7rwleNhBvZOvl5v88u345Qt19xP95j2Y/X I6cjFXKp21gZDPhBMIDnvB4sP0ADF51JhxUVVKoQNAixiGKiigxm9deTLB6AI29ckLsR zCUfRpiaZTmXZs4sBHMCeKpeCjor25oI/lMQPopIyBQmD0tyx9FUpFUk48cUFlquEE7p cJX0GyQu+gIB05kifj9MiskW/YHo7aIz1Ms/ybUMzg8snsteIBQs42qSbPnbBzq32yrt ewYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F5nuC2+j; dkim=neutral (no key) header.i=@linutronix.de header.b=uZlHXRxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs44-20020a1709072d2c00b0084d354539a5si38036244ejc.584.2023.01.18.04.19.41; Wed, 18 Jan 2023 04:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=F5nuC2+j; dkim=neutral (no key) header.i=@linutronix.de header.b=uZlHXRxg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbjARMQa (ORCPT + 99 others); Wed, 18 Jan 2023 07:16:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230169AbjARMP6 (ORCPT ); Wed, 18 Jan 2023 07:15:58 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 255AE84560; Wed, 18 Jan 2023 03:37:32 -0800 (PST) Date: Wed, 18 Jan 2023 11:37:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1674041849; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=63lJr1yEgRpYUaExnMPTyCaaSKYJEew65NbcNPhxgtk=; b=F5nuC2+jHSIaP1Ua4kXBqc1ZzNBalFODRlkbkW4PwQMLX9RPxfG/6nuYXkufAbIGBMYMVl qB0QyarO7yC+8fdCIQa1kjUSI/97sI6IclzKl/72kDkBfJoDri+S2gQvdDdYoSspnzNmuF ex/08fys6mywG+WVbi9qSpUJyiZ2pkvHbI7b2brTXOYSfAP48SsLgBWkuxmRnmCZI1Iz5A wKcC1bw5T/mHzk+v00mi/plLvKdvYKFMOXA499p2SAtpJiS6p5Yzfzc3EOWzVUqnUDjEaI nhOJHMq7ewqXCrwsL44yi1AZVYJuQYky+els9i4H4twA+AVwpLeDMzcAI809NA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1674041849; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=63lJr1yEgRpYUaExnMPTyCaaSKYJEew65NbcNPhxgtk=; b=uZlHXRxg6vFEVegnEnFWumBk8tAf5InAgmzxhIVeaAIiFnkGMC2+6sqNsPHg7W3rL2PbtW MsANffn9Bcr2MyAg== From: "tip-bot2 for Ingo Molnar" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/affinity: Only build SMP-only helper functions on SMP kernels Cc: Ming Lei , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20221227022905.352674-6-ming.lei@redhat.com> References: <20221227022905.352674-6-ming.lei@redhat.com> MIME-Version: 1.0 Message-ID: <167404184855.4906.755799913850425834.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755362786627089907?= X-GMAIL-MSGID: =?utf-8?q?1755362786627089907?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 188a569658584e93930ab60334c5a1079c0330d8 Gitweb: https://git.kernel.org/tip/188a569658584e93930ab60334c5a1079c0330d8 Author: Ingo Molnar AuthorDate: Wed, 18 Jan 2023 12:14:01 +01:00 Committer: Ingo Molnar CommitterDate: Wed, 18 Jan 2023 12:16:47 +01:00 genirq/affinity: Only build SMP-only helper functions on SMP kernels allnoconfig grew these new build warnings in lib/group_cpus.c: lib/group_cpus.c:247:12: warning: ‘__group_cpus_evenly’ defined but not used [-Wunused-function] lib/group_cpus.c:75:13: warning: ‘build_node_to_cpumask’ defined but not used [-Wunused-function] lib/group_cpus.c:66:13: warning: ‘free_node_to_cpumask’ defined but not used [-Wunused-function] lib/group_cpus.c:43:23: warning: ‘alloc_node_to_cpumask’ defined but not used [-Wunused-function] Widen the #ifdef CONFIG_SMP block to not expose unused helpers on non-SMP builds. Also annotate the preprocessor branches for better readability. Fixes: f7b3ea8cf72f ("genirq/affinity: Move group_cpus_evenly() into lib/") Cc: Ming Lei Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20221227022905.352674-6-ming.lei@redhat.com Signed-off-by: Ingo Molnar --- lib/group_cpus.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/group_cpus.c b/lib/group_cpus.c index 99f08c6..9c837a3 100644 --- a/lib/group_cpus.c +++ b/lib/group_cpus.c @@ -9,6 +9,8 @@ #include #include +#ifdef CONFIG_SMP + static void grp_spread_init_one(struct cpumask *irqmsk, struct cpumask *nmsk, unsigned int cpus_per_grp) { @@ -327,7 +329,6 @@ static int __group_cpus_evenly(unsigned int startgrp, unsigned int numgrps, return done; } -#ifdef CONFIG_SMP /** * group_cpus_evenly - Group all CPUs evenly per NUMA/CPU locality * @numgrps: number of groups @@ -412,7 +413,7 @@ struct cpumask *group_cpus_evenly(unsigned int numgrps) } return masks; } -#else +#else /* CONFIG_SMP */ struct cpumask *group_cpus_evenly(unsigned int numgrps) { struct cpumask *masks = kcalloc(numgrps, sizeof(*masks), GFP_KERNEL); @@ -424,4 +425,4 @@ struct cpumask *group_cpus_evenly(unsigned int numgrps) cpumask_copy(&masks[0], cpu_possible_mask); return masks; } -#endif +#endif /* CONFIG_SMP */