Re: drivers/mcb/mcb-parse.c:152: bad if expression
From: Johannes Thumshirn
Date: Mon Oct 17 2016 - 09:17:43 EST
On Mon, Oct 17, 2016 at 1:17 PM, David Binderman <dcb314@xxxxxxxxxxx> wrote:
> Hello there,
>
> drivers/mcb/mcb-parse.c:152:22: warning: logical âandâ of mutually exclusive tests is always false [-Wlogical-op]
>
> Source code is
>
> if (bar_count <= 0 && bar_count > CHAMELEON_BAR_MAX)
>
> Maybe better code
>
> if (bar_count <= 0 || bar_count > CHAMELEON_BAR_MAX)
>
> Regards
>
> David Binderman
Hi David,
Looks reasonable, care to send a patch?
Thanks,
Johannes