Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/27447 )
Change subject: Coverity: Fix CID1393976 ......................................................................
Coverity: Fix CID1393976
Cast to u64 to prevent possible integer overflow.
Change-Id: I5c7d25278db54523242314cba6c85ac2f7a6c1f3 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/27447 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Philipp Deppenwiese zaolin.daisuki@gmail.com --- M src/soc/cavium/cn81xx/clock.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Philipp Deppenwiese: Looks good to me, approved
diff --git a/src/soc/cavium/cn81xx/clock.c b/src/soc/cavium/cn81xx/clock.c index bd6514c..02f152f 100644 --- a/src/soc/cavium/cn81xx/clock.c +++ b/src/soc/cavium/cn81xx/clock.c @@ -63,7 +63,7 @@
rst_boot.u = read64((void *)RST_PF_BAR0);
- return rst_boot.s.pnr_mul * PLL_REF_CLK; + return ((u64)rst_boot.s.pnr_mul) * PLL_REF_CLK; }
/** @@ -75,5 +75,5 @@
rst_boot.u = read64((void *)RST_PF_BAR0);
- return rst_boot.s.c_mul * PLL_REF_CLK; + return ((u64)rst_boot.s.c_mul) * PLL_REF_CLK; }