aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Pieralisi <[email protected]>2019-07-22 17:14:33 +0100
committerWill Deacon <[email protected]>2019-08-05 11:06:34 +0100
commit3e77eeb7a27fc3dcf6b65e7ee01ac00bf5d2b4fb (patch)
tree50a8974948efcb06aca18e192477afa4f4cdf2bf
parentb717480f5415201286cc9b5e3244513f54a327c4 (diff)
ACPI/IORT: Rename arm_smmu_v3_set_proximity() 'node' local variable
Commit 36a2ba07757d ("ACPI/IORT: Reject platform device creation on NUMA node mapping failure") introduced a local variable 'node' in arm_smmu_v3_set_proximity() that shadows the struct acpi_iort_node pointer function parameter. Execution was unaffected but it is prone to errors and can lead to subtle bugs. Rename the local variable to prevent any issue. Reviewed-by: Hanjun Guo <[email protected]> Reported-by: Will Deacon <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Cc: Will Deacon <[email protected]> Cc: Hanjun Guo <[email protected]> Cc: Sudeep Holla <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Kefeng Wang <[email protected]> Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--drivers/acpi/arm64/iort.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 8569b79e8b58..5a7551d060f2 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -1256,12 +1256,12 @@ static int __init arm_smmu_v3_set_proximity(struct device *dev,
smmu = (struct acpi_iort_smmu_v3 *)node->node_data;
if (smmu->flags & ACPI_IORT_SMMU_V3_PXM_VALID) {
- int node = acpi_map_pxm_to_node(smmu->pxm);
+ int dev_node = acpi_map_pxm_to_node(smmu->pxm);
- if (node != NUMA_NO_NODE && !node_online(node))
+ if (dev_node != NUMA_NO_NODE && !node_online(dev_node))
return -EINVAL;
- set_dev_node(dev, node);
+ set_dev_node(dev, dev_node);
pr_info("SMMU-v3[%llx] Mapped to Proximity domain %d\n",
smmu->base_address,
smmu->pxm);