[BUG ?] pmcraid: condition with no effect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



scanning for trivial bug-patters with coccinelle spatches returned:
./drivers/scsi/pmcraid.c:1603
        WARNING: condition with no effect (if branch == else)

introduced in 'commit c20c426732a5 ("[SCSI] pmcraid: MSI-X support and other changes")'

drivers/scsi/pmcraid.c - line numbers from 4.1-rc7
1603         if (fw_version <= PMCRAID_FW_VERSION_1)
1604                 hidden_entry = (cfg_entry->unique_flags1 & 0x80) != 0;
1605         else            
1606                 hidden_entry = (cfg_entry->unique_flags1 & 0x80) != 0;

As "hidden_entry = (cfg_entry->unique_flags1 & 0x80) != 0;" is probing the
bit the if condition simply looks unnecessary - if this "fix" would do is
not clear though without knowing details of the driver.

thx!
hofrat
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux