Re: drivers/mcb/mcb-parse.c:152: bad if expression

2016-10-17 Thread Johannes Thumshirn
On Mon, Oct 17, 2016 at 1:17 PM, David Binderman  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


Re: drivers/mcb/mcb-parse.c:152: bad if expression

2016-10-17 Thread Johannes Thumshirn
On Mon, Oct 17, 2016 at 1:17 PM, David Binderman  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