[<prev] [next>] [day] [month] [year] [list]
Message-Id: <3184A4EA-4F3C-4CBC-AAA1-355CB62B5DE2@holtmann.org>
Date: Tue, 22 Nov 2016 22:49:38 +0100
From: Marcel Holtmann <marcel@...tmann.org>
To: David Binderman <dcb314@...mail.com>
Cc: "Gustavo F. Padovan" <gustavo@...ovan.org>,
Johan Hedberg <johan.hedberg@...il.com>,
"linux-bluetooth@...r.kernel.org" <linux-bluetooth@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: drivers/bluetooth/dtl1_cs.c:559: bad if statement ?
Hi David,
> drivers/bluetooth/dtl1_cs.c:559:32: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
>
> Source code is
>
> if ((p_dev->resource[1]->end) || (p_dev->resource[1]->end < 8))
> return -ENODEV;
>
> Maybe better code
>
> if ((p_dev->resource[1]->end < 0) || (p_dev->resource[1]->end >= 8))
> return -ENODEV;
mind sending a patch?
Regards
Marcel
Powered by blists - more mailing lists