[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <E5313AF6F2BFD14293E5FD0F94750F86AE58BEFC5F@HQ1-EXCH01.corp.brocade.com>
Date: Mon, 12 Dec 2011 16:45:40 -0800
From: Jing Huang <huangj@...cade.COM>
To: Joe Perches <joe@...ches.com>, roel <roel.kluin@...il.com>,
"James E.J. Bottomley" <JBottomley@...allels.com>,
Krishna Gudipati <kgudipat@...cade.com>
CC: Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
linux-scsi <linux-scsi@...r.kernel.org>
Subject: RE: drivers/scsi/bfa/bfa_fcpim.c: boolean and / or confusion
>On Tue, 2011-12-13 at 00:06 +0100, roel wrote:
>> The test not [val1] or not [val2] always evaluates to true
>
>Looking at drivers with:
>
>$ grep -rP --include=*.[ch] "(\b[\w\[\]\>\._\-]+)\s*\!\=\s*[\w\[\]\>\._\-
>]+\s*\)\s*\|\|\s*\(\s*\1\s*\!\=" drivers
>
>drivers/scsi/bfa/bfa_fcpim.c: ((cdb->scsi_cdb[0] != INQUIRY) ||
> (cdb->scsi_cdb[0] != REPORT_LUNS))) {
>
>Likely the || should be &&
This is a bug and it should be &&. Will provide a fix.
Thanks
Jing
Powered by blists - more mailing lists