[Skiboot] [PATCH] ibm-fsp/firenze: Fix unused overwritten value
Gavin Shan
gwshan at linux.vnet.ibm.com
Tue Jun 21 12:13:17 AEST 2016
On Tue, Jun 21, 2016 at 11:57:52AM +1000, Stewart Smith wrote:
>Found with static analysis:
>
>939 id = ((uint64_t)p[1] << 32) | p[2];
> value_overwrite: Overwriting previous write to id with value 0ULL.
>940 id = 0;
>
>Fixes: 6884fe63
>Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
Acked-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
Stewart, thanks for fixing it up.
Thanks,
Gavin
>---
> platforms/ibm-fsp/firenze-pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c
>index b13f1e52fc05..4a9aff300504 100644
>--- a/platforms/ibm-fsp/firenze-pci.c
>+++ b/platforms/ibm-fsp/firenze-pci.c
>@@ -937,7 +937,7 @@ static void firenze_pci_slot_fixup(struct pci_slot *slot)
>
> /* FIXME: support fixup with generic way */
> id = ((uint64_t)p[1] << 32) | p[2];
>- id = 0;
>+
> if (id != LX_VPD_2S4U_BACKPLANE &&
> id != LX_VPD_1S4U_BACKPLANE)
> return;
>--
>2.1.4
>
>_______________________________________________
>Skiboot mailing list
>Skiboot at lists.ozlabs.org
>https://lists.ozlabs.org/listinfo/skiboot
More information about the Skiboot
mailing list