Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH] media: firmware: qcom_scm: Simplify the calculation of variables
@ 2021-01-26  8:52 Jiapeng Zhong
  2021-01-26 14:07 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Zhong @ 2021-01-26  8:52 UTC (permalink / raw)
  To: agross; +Cc: bjorn.andersson, p.zabel, linux-arm-msm, linux-kernel,
	Jiapeng Zhong

Fix the following coccicheck warnings:

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

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
 drivers/firmware/qcom_scm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
index 7be48c1..c530072 100644
--- a/drivers/firmware/qcom_scm.c
+++ b/drivers/firmware/qcom_scm.c
@@ -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) {
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: firmware: qcom_scm: Simplify the calculation of variables
  2021-01-26  8:52 [PATCH] media: firmware: qcom_scm: Simplify the calculation of variables Jiapeng Zhong
@ 2021-01-26 14:07 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2021-01-26 14:07 UTC (permalink / raw)
  To: Jiapeng Zhong; +Cc: agross, p.zabel, linux-arm-msm, linux-kernel

On Tue 26 Jan 02:52 CST 2021, Jiapeng Zhong wrote:

> Fix the following coccicheck warnings:
> 
> ./drivers/firmware/qcom_scm.c:324:20-22: WARNING !A || A && B is
> equivalent to !A || B.
> 

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
> ---
>  drivers/firmware/qcom_scm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index 7be48c1..c530072 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -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) {
> -- 
> 1.8.3.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-26 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-26  8:52 [PATCH] media: firmware: qcom_scm: Simplify the calculation of variables Jiapeng Zhong
2021-01-26 14:07 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox