Skip to contentSkip to conversation

xen/arm: psci: Populate arm_smccc_res on PSCI_FEATURES call

PATCH In review Julien Grall 3 participants 3 messages Feb 18, 2019 – Feb 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/arm: psci: Populate arm_smccc_res on PSCI_FEATURES call

Commit 0bc6a68da5 "xen/arm: Replace call_smc with arm_smccc_smc" mistakenly forgot to populate arm_smccc_res. So a garbagge value was used as return value.

Coverity-ID: 1476827

---
 xen/arch/arm/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/psci.c +1 -1
index d23cb8e76e..0c90c2305c 100644
@@ -87,7 +87,7 @@ static int __init psci_features(uint32_t psci_func_id)
     if ( psci_ver < PSCI_VERSION(1, 0) )
         return PSCI_NOT_SUPPORTED;
 
-    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, NULL);
+    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, &res);
 
     return PSCI_RET(res);
 }
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 6 lines · Julien Grall

Commit 0bc6a68da5 "xen/arm: Replace call_smc with arm_smccc_smc" mistakenly forgot to populate arm_smccc_res. So a garbagge value was used as return value.

Coverity-ID: 1476827

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Julien Grall
Quoted 2 lines · Julien Grall

Commit 0bc6a68da5 "xen/arm: Replace call_smc with arm_smccc_smc" mistakenly forgot to populate arm_smccc_res. So a garbagge value was

^ garbage

Quoted 4 lines

used as return value.

Coverity-ID: 1476827

Quoted 20 lines
---
 xen/arch/arm/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/psci.c +1 -1
index d23cb8e76e..0c90c2305c 100644
@@ -87,7 +87,7 @@ static int __init psci_features(uint32_t psci_func_id)
     if ( psci_ver < PSCI_VERSION(1, 0) )
         return PSCI_NOT_SUPPORTED;
 
-    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, NULL);
+    arm_smccc_smc(PSCI_1_0_FN32_PSCI_FEATURES, psci_func_id, &res);
 
     return PSCI_RET(res);
 }
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel