RE: drivers/scsi/bfa/bfa_fcpim.c: boolean and / or confusion

From: Jing Huang
Date: Mon Dec 12 2011 - 20:42:18 EST


>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
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i