lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 13 Jun 2015 12:39:25 +0200
From:	Nicholas Mc Guire <hofrat@...dl.org>
To:	Anil Ravindranath <anil_ravindranath@...-sierra.com>
Cc:	"James E.J. Bottomley" <JBottomley@...n.com>,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nicholas Mc Guire <hofrat@...dl.org>
Subject: [BUG ?] pmcraid: condition with no effect                   


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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ