Skip to contentSkip to conversation

media: firmware: qcom_scm: Simplify the calculation of variables

PATCH In review Jiapeng Zhong 2 participants 2 messages Jan 26, 2021 Arm Qualcomm mailing list

lore
Share & tools
lore
Reviewed-by on v1 1/1
#1 lore raw
In reply to Jiapeng Zhong
Quoted 5 lines · Jiapeng Zhong

Fix the following coccicheck warnings:

./drivers/firmware/qcom_scm.c:324:20-22: WARNING !A || A && B is equivalent to !A || B.

Quoted 22 lines
---
 drivers/firmware/qcom_scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/qcom_scm.c +1 -1
index 7be48c1..c530072 100644
@@ -321,7 +321,7 @@ int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
 		.owner = ARM_SMCCC_OWNER_SIP,
 	};
 
-	if (!cpus || (cpus && cpumask_empty(cpus)))
+	if (!cpus || cpumask_empty(cpus))
 		return -EINVAL;
 
 	for_each_cpu(cpu, cpus) {
Signature · 1 line
1.8.3.1
#0 lore raw

PATCH 1/1 media: firmware: qcom_scm: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/firmware/qcom_scm.c:324:20-22: WARNING !A || A && B is equivalent to !A || B.

---
 drivers/firmware/qcom_scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/qcom_scm.c +1 -1
index 7be48c1..c530072 100644
@@ -321,7 +321,7 @@ int qcom_scm_set_cold_boot_addr(void *entry, const cpumask_t *cpus)
 		.owner = ARM_SMCCC_OWNER_SIP,
 	};
 
-	if (!cpus || (cpus && cpumask_empty(cpus)))
+	if (!cpus || cpumask_empty(cpus))
 		return -EINVAL;
 
 	for_each_cpu(cpu, cpus) {
Signature · 1 line
1.8.3.1