Re: [PATCH] hw/misc: Fix arith overflow in NPCM7XX PWM module

2021-01-25 Thread Philippe Mathieu-Daudé
Hi Hao Wu, On 1/26/21 12:48 AM, wuhaotsh--- via wrote: > There's a potential arith overflow in npcm7xx_pwm_calculate_duty. > This patch fixes it. ^ not very useful information ;) What about the simplest approach Peter suggested, a 32-bit duty? > Thanks Peter for finding this out.

[PATCH] hw/misc: Fix arith overflow in NPCM7XX PWM module

2021-01-25 Thread wuhaotsh--- via
There's a potential arith overflow in npcm7xx_pwm_calculate_duty. This patch fixes it. Thanks Peter for finding this out. Signed-off-by: Hao Wu --- hw/misc/npcm7xx_pwm.c | 4 ++-- tests/qtest/npcm7xx_pwm-test.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git