Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp4141365iog; Tue, 21 Jun 2022 12:57:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vGFLhC0rSdCI/Ypq/QXkxI+f1A1lV9BaaxanfsZ1XvgO3z/6mhDeNhwm5EkKTIE1mrFeis X-Received: by 2002:a05:6402:c95:b0:435:8113:1276 with SMTP id cm21-20020a0564020c9500b0043581131276mr13943080edb.193.1655841460419; Tue, 21 Jun 2022 12:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655841460; cv=none; d=google.com; s=arc-20160816; b=D0BAUj9fBsEFkTYEIIsIwLByv2aCaBqTfw/h4TOYgfOAcj59gCfV0htn4s8yhHpDXj BmBmPkjr1DmnSdMJUhuMn0ZkAAGJnLuleumHWBwqrCxhr83nUC4DTPXUlqU5sCznvEgV 4+CDjui/TJMj3trhGDKYnBLoaOwPVbSKlkwMhlreaXDOXaNm/Mc1SbhlqjAegjy1Yd7a cFe+Uxij54/ZczEQONpNp3K0e15TOmTw2yHhlxYWU8MBdlKIZc8P4zNeKPQsPYn3EwA0 dFSYFl4WLB0JJgth9aPCSAzXNXaCWquS8gBhYR/VSRF9wO6pcSDglfgVekZevibwWC7K QgLQ== 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=7LPLXNVGfKZjEDkr5NuVU2VdzXp3Mp1bOqILTbzdW/w=; b=hp5jR1N7izz78yCy9M2tuxqbvmO1LkC/hy/dyoibY2MY+2IQtT7/U0GPdMAyqpIBpV P4LrpnOmfU4Hls5ARdFUbodOYhfdKLU9kzZ2RbyBWmD3JprQNvcRFCrwAMQVN3pqBcmi eNu2JpW5B+YSow2iryDhefItvoq2akQuL/I5JSQmCHiJ7i9JtE+BgJ9+ZZ9HSmonCMgC FOLFU6vdCoj4W8VDqvGsThpuGYI7DO3pB9zWNwy7n179mFY6LNm7smoFpBnIEv3Y7ULg d4raJBht36zvzXR0WvRxlULqEygZG0KA1JMbjUjmuKkg/Vq+xHv7TuE1OJFXqed9brmN q5Zg== 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 t25-20020aa7d719000000b00435799fcb36si8548544edq.525.2022.06.21.12.57.15; Tue, 21 Jun 2022 12:57:40 -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 S1353829AbiFUTWD (ORCPT + 99 others); Tue, 21 Jun 2022 15:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353472AbiFUTVV (ORCPT ); Tue, 21 Jun 2022 15:21:21 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D0F651163 for ; Tue, 21 Jun 2022 12:21:19 -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 C371E1688; Tue, 21 Jun 2022 12:21:19 -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 CCC8B3F792; Tue, 21 Jun 2022 12:21:17 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, Greg KH Cc: Sudeep Holla , Atish Patra , Atish Patra , Vincent Guittot , Dietmar Eggemann , Qing Wang , Rob Herring , "Rafael J . Wysocki" , Ionela Voinescu , Pierre Gondois , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org Subject: [PATCH v4 16/20] arch_topology: Drop unnecessary check for uninitialised package_id Date: Tue, 21 Jun 2022 20:20:30 +0100 Message-Id: <20220621192034.3332546-17-sudeep.holla@arm.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220621192034.3332546-1-sudeep.holla@arm.com> References: <20220621192034.3332546-1-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_NONE,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 46fa1b70b02b..42448a5a9412 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -611,7 +611,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) { @@ -633,16 +632,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