[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAGH8bx6fooA=QqsLyephaEuHGqzRbwa5Uisx7D7negMtxHYhyw@mail.gmail.com>
Date: Mon, 17 Oct 2016 15:16:44 +0200
From: Johannes Thumshirn <morbidrsa@...il.com>
To: David Binderman <dcb314@...mail.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Michael Moese <michael.moese@....de>
Subject: Re: drivers/mcb/mcb-parse.c:152: bad if expression
On Mon, Oct 17, 2016 at 1:17 PM, David Binderman <dcb314@...mail.com> 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
Powered by blists - more mailing lists