Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3536375pxp; Tue, 8 Mar 2022 16:54:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJzH4qSEpf/OdISmi7UpehAALaxLSY/Ybb5Zgw7Z8RH4emR99/ralI8j7qxXz5BILXFS2zYC X-Received: by 2002:aa7:8d54:0:b0:4e0:bd6:cfb9 with SMTP id s20-20020aa78d54000000b004e00bd6cfb9mr21013194pfe.60.1646787242425; Tue, 08 Mar 2022 16:54:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646787242; cv=none; d=google.com; s=arc-20160816; b=00E9qqy4xycOW7tvFFvwU/axlR3/N/CoStE5Qfx3m6J18l3COsapjOn1mzZbm2BI9Z kl1qRIKDERtVShuzHtEaRgtfHyYagCm50Py5Vqqd/0WbvxRGPpZYsUBUvk/0cttFLY6d i0mW/XQ5OxWIIIChycve0hEIYMLfnVhGlgf5ut2amEKkmytwinVh8uPXBVwWAKe8eV6b 5Ak3Qxzh+BhiobdAnEQbwZYVkvwOSv5cTKcVoIXeo7Mxo7o7aIrlFD5q/Z+oxybbLNQ7 q+GdRw2xv0ZArmbgC2fiImt+fQu1TJg1Wx+to9ecaZnyctCOamwuCZhNVbeHhByCZSy8 tefA== 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=tDOCC6fJPsTkG+qvHEySw4J70C9xQqVLmfp1R+zQxdM=; b=ivx7mMHtYTeVB/Jc9WFCRHphI8a4aJoowiQ9PwITljSYg6DL9PIo+zQEFUXGFUMFAl KIJ4x4yPXfkWzi36I1El+vNu2b3N4r/50AR81VbpdIIUl2PLSlLXhlUDQIWSKQqBRpCJ o4QMzkQR2dYSVYBQUApravPIRvkOCLxFdDUSsYqPyRRZ75PNsA6sHGSVICxdP0Z3NQwl tsSiCojuEzpfkK2r4FfgT/oRZj0mqFsqw0PPuyc7I0UoWcNL3wjVE5OzNnRhw7+bEm+H ReqWmg2w5BNqhyDo4xWWDRxCvMEaUrlBdw2Cn0wwogaJWONOYZtu5ZFY6bXIEHthgiA8 mQRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QyNquRJC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m14-20020a170902f64e00b0014f66f6d7a3si455904plg.536.2022.03.08.16.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 16:54:02 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QyNquRJC; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 918D116113D; Tue, 8 Mar 2022 16:07:54 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350708AbiCHW0V (ORCPT + 99 others); Tue, 8 Mar 2022 17:26:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236364AbiCHW0T (ORCPT ); Tue, 8 Mar 2022 17:26:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F650583A3; Tue, 8 Mar 2022 14:25:22 -0800 (PST) Date: Tue, 08 Mar 2022 22:25:18 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1646778320; 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=tDOCC6fJPsTkG+qvHEySw4J70C9xQqVLmfp1R+zQxdM=; b=QyNquRJCeKmWWi6OBjvcRijufrstVJIhWI0PIpqpwRoAChCYOkvRpykiZ8uYK0LfPsxmHC cQAsCZhk8I9zpsJ6IJQYeCG2AZ89PtqnTR9OK1ewvFpzu4yJCpdoQEZuf6vHlFRrrmd1vw 0W3WVpalOIhWmm/ezx5Z52TiHa703LcZT6ujGMPpIGLvK5ZKo47XoiZjZshxf6QYjoyzty ntgHljM8niC1Gln6QscXGj4d7AROdNjSI/+CxFaygq8yJFEJsGWK9kgqhfItk5jVFZ6Mvu vQmJNuamEe56HfiPg+ZGOQze7KpltD+Ey0fRO1hat2478gHwZsmQYsnCRk6rzQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1646778320; 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=tDOCC6fJPsTkG+qvHEySw4J70C9xQqVLmfp1R+zQxdM=; b=V4TzrgnOZHpQjOT1bND1xkE7DrP1U1thMEtEKk2+YP29vmOBrS60rBb/S1aBiPVIx+B+wY W5+2BDMsg6F9YHBA== From: "tip-bot2 for K Prateek Nayak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/topology: Remove redundant variable and fix incorrect type in build_sched_domains Cc: kernel test robot , K Prateek Nayak , "Peter Zijlstra (Intel)" , Valentin Schneider , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20220218162743.1134-1-kprateek.nayak@amd.com> References: <20220218162743.1134-1-kprateek.nayak@amd.com> MIME-Version: 1.0 Message-ID: <164677831883.16921.2209475420454417488.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 The following commit has been merged into the sched/core branch of tip: Commit-ID: 7f434dff76215af00c26ba6449eaa4738fe9e2ab Gitweb: https://git.kernel.org/tip/7f434dff76215af00c26ba6449eaa4738fe9e2ab Author: K Prateek Nayak AuthorDate: Fri, 18 Feb 2022 21:57:43 +05:30 Committer: Peter Zijlstra CommitterDate: Tue, 08 Mar 2022 16:08:40 +01:00 sched/topology: Remove redundant variable and fix incorrect type in build_sched_domains While investigating the sparse warning reported by the LKP bot [1], observed that we have a redundant variable "top" in the function build_sched_domains that was introduced in the recent commit e496132ebedd ("sched/fair: Adjust the allowed NUMA imbalance when SD_NUMA spans multiple LLCs") The existing variable "sd" suffices which allows us to remove the redundant variable "top" while annotating the other variable "top_p" with the "__rcu" annotation to silence the sparse warning. [1] https://lore.kernel.org/lkml/202202170853.9vofgC3O-lkp@intel.com/ Fixes: e496132ebedd ("sched/fair: Adjust the allowed NUMA imbalance when SD_NUMA spans multiple LLCs") Reported-by: kernel test robot Signed-off-by: K Prateek Nayak Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20220218162743.1134-1-kprateek.nayak@amd.com --- kernel/sched/topology.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 32841c6..43f2899 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -2291,7 +2291,7 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att if (!(sd->flags & SD_SHARE_PKG_RESOURCES) && child && (child->flags & SD_SHARE_PKG_RESOURCES)) { - struct sched_domain *top, *top_p; + struct sched_domain __rcu *top_p; unsigned int nr_llcs; /* @@ -2316,11 +2316,9 @@ build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *att sd->imb_numa_nr = imb; /* Set span based on the first NUMA domain. */ - top = sd; - top_p = top->parent; + top_p = sd->parent; while (top_p && !(top_p->flags & SD_NUMA)) { - top = top->parent; - top_p = top->parent; + top_p = top_p->parent; } imb_span = top_p ? top_p->span_weight : sd->span_weight; } else {