[Skiboot] [PATCH V2 1/2] platforms/ibm-fsp: Fix incorrect struct member access and comparison

Stewart Smith stewart at linux.vnet.ibm.com
Thu Jul 28 14:37:24 AEST 2016

Suraj Jitindar Singh <sjitindarsingh at gmail.com> writes:
> For a 1004 slot mapping bit 6 (0x40) of the P0 field represents the
> pwr_ctl bit. This code previously accessed the wrong field (power_ctl)
> which is a single bit which corresponds to the 1005 mapping (which is
> the wrong mapping), performed a bitwise and with 0x40 (which will always
> be 0), and then compared to 1 (which will also always be 0).
> Fix this to access the byte struct member, bitwise and with 0x40 to mask
> the power_ctl bit, and double negate to guarantee 0 or 1 result.
> Fixes: Coverity Bug #97820
> Fixes: 6884fe63 ("platforms/ibm-fsp: Support PCI slot")
> Signed-off-by: Suraj Jitindar Singh <sjitindarsingh at gmail.com>
> Acked-by: Gavin Shan <gwshan at linux.vnet.ibm.com>

applied to master as of a7f9956

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list