Re: [PATCH] aspeed/smc: Fix possible integer overflow

2024-07-18 Thread Cédric Le Goater
On 7/12/24 18:36, Cédric Le Goater wrote: Coverity reports a possible integer overflow because routine aspeeed_smc_hclk_divisor() has a codepath returning 0, which could lead to an integer overflow when computing variable 'hclk_shift' in the caller aspeed_smc_dma_calibration(). The value passed

Re: [PATCH] aspeed/smc: Fix possible integer overflow

2024-07-12 Thread Peter Maydell
On Fri, 12 Jul 2024 at 17:36, Cédric Le Goater wrote: > > Coverity reports a possible integer overflow because routine > aspeeed_smc_hclk_divisor() has a codepath returning 0, which could > lead to an integer overflow when computing variable 'hclk_shift' in > the caller aspeed_smc_dma_calibration(

[PATCH] aspeed/smc: Fix possible integer overflow

2024-07-12 Thread Cédric Le Goater
Coverity reports a possible integer overflow because routine aspeeed_smc_hclk_divisor() has a codepath returning 0, which could lead to an integer overflow when computing variable 'hclk_shift' in the caller aspeed_smc_dma_calibration(). The value passed to aspeed_smc_hclk_divisor() is always betwe