I just tried out the extra compiler flag -Wlogical-op on the source code of the linux kernel 3.6-rc3. The compiler said drivers/staging/rts_pstor/rtsx_scsi.c: In function ‘spi_vendor_cmd’: drivers/staging/rts_pstor/rtsx_scsi.c:2485:2: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op] if (CHECK_PID(chip, 0x5208) && CHECK_PID(chip, 0x5288)) { but drivers/staging/rts_pstor/rtsx_chip.h:#define CHECK_PID(chip, pid) ((chip)->product_id == (pid)) Suggest replace && with || in the if test.
On Tue, Aug 28, 2012 at 05:18:55PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=46581 Please send a patch through email for this issue, I can't take fixes from bugzilla.
A patch referencing this bug report has been merged in Linux v3.7-rc1: commit 0ff15d54161cc0e57fed79de1b5731c81225d668 Author: Alan Cox <alan@linux.intel.com> Date: Tue Sep 4 15:23:46 2012 +0100 staging: rts_pstor: Fix invalid check