[PATCH v4 16/20] arch_topology: Drop unnecessary check for uninitialised package_id
From: Sudeep Holla
Date: Tue Jun 21 2022 - 15:22:07 EST
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 <sudeep.holla@xxxxxxx>
---
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