Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3573407ioo; Wed, 25 May 2022 03:48:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzCDTVSUKjSeU+dGXg/oQFonBvl5mlIhRsuCM3aBw2MCfZhayGc195LEFMVTuINtoj7AoM X-Received: by 2002:a17:902:e5cb:b0:161:de39:11a2 with SMTP id u11-20020a170902e5cb00b00161de3911a2mr5040490plf.72.1653475684169; Wed, 25 May 2022 03:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653475684; cv=none; d=google.com; s=arc-20160816; b=qesRd+L7uFoFsaPeBXIExURPmZgOAU5t9mtoLyBRGm9vLsDliwt4EpCMcrLPt6aMVI zwiEP52bcGQbUCS4ecmJrFoNUYzRf54hw6oom9IidJcCDcYGwcc0Zo7BBIjID37oAIiL 8adFUYmcbSQe78aiSvFb+QpfVDaCyIrciQcQFtj504Sqkypy98sPmTidtSY0OMbqHiAh dVj2BOZm6C5rrolXDlKRbnaWRltpMWejF8Q8iQrbMV7794XzKFFexy8HdQD1MfdUqZUH vOym+YiToyVPO5FkMVikGSGO3iKpsW8hoQ3NTwpfbbTFy/p8hkaOl8qrfA68lGrujJ/k Lb3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=GH0BYZ90ewKAxGJNguAD23P/jJ8SOlcGABMVgyrBpMs=; b=0f7nuvErblA/BdrjtyiEdRUBMFSOXQsZXe5TiS+JhSh3vvQ4UUAzl6fFeBZKcWqaj3 cMICvg/fdxJrhM7c4QXHyvotDfpLoycuTj1YEH+M2AefslpMJCBBNv4QHUz1D2wKpwKd pmyXE+VWPFEY/LeEqqBuCm6YJD25saAAqUR6H0ndIOMhq4VNzZTDRjP1vgTg76N6dyNR Cx4qmiI3Z19n4l/sxK5xDuv0CAc9YfA0LRuxR+g0eCULgCy4joacL6CuBHA/ytvXLb2W WU/kE8KfwRjrOLEBTIBg0Dmhb67P2xiHXpaJ4WKXic96KIzZcLDSztFlcqN2JUJeVynS f69w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kb4-20020a17090ae7c400b001df7d0ea04bsi2387507pjb.137.2022.05.25.03.47.51; Wed, 25 May 2022 03:48:04 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231790AbiEYIQA (ORCPT + 99 others); Wed, 25 May 2022 04:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241964AbiEYIPG (ORCPT ); Wed, 25 May 2022 04:15:06 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6A98D880F3 for ; Wed, 25 May 2022 01:15:02 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 036D423A; Wed, 25 May 2022 01:15:02 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5C0683F73D; Wed, 25 May 2022 01:15:00 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org Cc: Sudeep Holla , Atish Patra , Atish Patra , Vincent Guittot , Morten Rasmussen , Dietmar Eggemann , Qing Wang , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Rob Herring Subject: [PATCH v3 14/16] arch_topology: Drop unnecessary check for uninitialised package_id Date: Wed, 25 May 2022 09:14:14 +0100 Message-Id: <20220525081416.3306043-15-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220525081416.3306043-14-sudeep.holla@arm.com> References: <20220525081416.3306043-1-sudeep.holla@arm.com> <20220525081416.3306043-2-sudeep.holla@arm.com> <20220525081416.3306043-3-sudeep.holla@arm.com> <20220525081416.3306043-4-sudeep.holla@arm.com> <20220525081416.3306043-5-sudeep.holla@arm.com> <20220525081416.3306043-6-sudeep.holla@arm.com> <20220525081416.3306043-7-sudeep.holla@arm.com> <20220525081416.3306043-8-sudeep.holla@arm.com> <20220525081416.3306043-9-sudeep.holla@arm.com> <20220525081416.3306043-10-sudeep.holla@arm.com> <20220525081416.3306043-11-sudeep.holla@arm.com> <20220525081416.3306043-12-sudeep.holla@arm.com> <20220525081416.3306043-13-sudeep.holla@arm.com> <20220525081416.3306043-14-sudeep.holla@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 With the support of socket node parsing from the device tree and assigning 0 as package_id in absence of socket nodes, there is no need to check for invalid package_id. It is always initialised to 0 or values from the device tree socket nodes. Just drop that now redundant check for uninitialised package_id. Signed-off-by: Sudeep Holla --- drivers/base/arch_topology.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index e7876a7a82ec..b8f0d72908c8 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -606,7 +606,6 @@ static int __init parse_dt_topology(void) { struct device_node *cn, *map; int ret = 0; - int cpu; cn = of_find_node_by_path("/cpus"); if (!cn) { @@ -628,16 +627,6 @@ static int __init parse_dt_topology(void) topology_normalize_cpu_scale(); - /* - * Check that all cores are in the topology; the SMP code will - * only mark cores described in the DT as possible. - */ - for_each_possible_cpu(cpu) - if (cpu_topology[cpu].package_id < 0) { - ret = -EINVAL; - break; - } - out_map: of_node_put(map); out: -- 2.36.1