Message ID | 1466474272-20572-1-git-send-email-stewart@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
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@linux.vnet.ibm.com> Acked-by: Gavin Shan <gwshan@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@lists.ozlabs.org >https://lists.ozlabs.org/listinfo/skiboot
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;
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@linux.vnet.ibm.com> --- platforms/ibm-fsp/firenze-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)