Re: drivers/cpufreq/brcmstb-avs-cpufreq.c:449: bad test ?

From: Viresh Kumar
Date: Tue Nov 05 2019 - 01:47:50 EST


On 28-10-19, 15:18, David Binderman wrote:
> Hello there,
>
> drivers/cpufreq/brcmstb-avs-cpufreq.c:449:61: warning: logical âorâ of collectively exhaustive tests is always true [-Wlogical-op]
>
> Source code is
>
> return (magic == AVS_FIRMWARE_MAGIC) && ((rc != -ENOTSUPP) ||
> (rc != -EINVAL));
>
> Maybe better code:
>
> return (magic == AVS_FIRMWARE_MAGIC) && (rc != -ENOTSUPP) &&
> (rc != -EINVAL);

Right. Care to send a proper patch for this ?

--
viresh