Linux PWM subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] pwm: Fix division by 0 issues
@ 2025-04-01 10:28 Uwe Kleine-König
  2025-04-01 10:28 ` [PATCH 1/3] pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config() Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2025-04-01 10:28 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno, Yoshihiro Shimoda,
	Simon Horman, Thierry Reding, Patrick Havelange, John Crispin
  Cc: Ingo Molnar, linux-pwm, linux-arm-kernel, linux-mediatek,
	Josh Poimboeuf

Hello,

triggered by Josh Poimboeuf's patch to fix a warning by objtool due to a
division by zero in the pwm-mediatek driver, I reviewed all pwm drivers
for similar issues.

Josh's patch is resent here, the two additional patches are new. objtool
didn't warn about these even though these are quite similar divisions by
zero. I didn't debug why these were not catched by clang/objtool.

I haven't made up my mind yet if I'll send them for inclusion in
6.15 given that they are new and only build-tested so far. Also the
commits that introduced these problems are already old (v4.12-rc1,
v4.4-rc1 and v5.3-rc1 respectively) and there is no indication this
problem triggers on real hardware.

I'll put them in my for-next branch anyhow for wider exposure. I happily
accept test reports to (hopefully) increase my confidence in these
patches.

Best regards
Uwe

Josh Poimboeuf (1):
  pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config()

Uwe Kleine-König (2):
  pwm: rcar: Improve register calculation
  pwm: fsl-ftm: Handle clk_get_rate() returning 0

 drivers/pwm/pwm-fsl-ftm.c  |  6 ++++++
 drivers/pwm/pwm-mediatek.c |  8 ++++++--
 drivers/pwm/pwm-rcar.c     | 23 ++++++++++++-----------
 3 files changed, 24 insertions(+), 13 deletions(-)


base-commit: 6df320abbb40654085d7258de33d78481e93ac8d
-- 
2.47.2

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-04-04  7:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-01 10:28 [PATCH 0/3] pwm: Fix division by 0 issues Uwe Kleine-König
2025-04-01 10:28 ` [PATCH 1/3] pwm: mediatek: Prevent divide-by-zero in pwm_mediatek_config() Uwe Kleine-König
2025-04-01 10:29 ` [PATCH 2/3] pwm: rcar: Improve register calculation Uwe Kleine-König
2025-04-04  6:48   ` Geert Uytterhoeven
2025-04-04  7:25     ` Uwe Kleine-König
2025-04-01 10:29 ` [PATCH 3/3] pwm: fsl-ftm: Handle clk_get_rate() returning 0 Uwe Kleine-König
2025-04-03 15:45 ` [PATCH 0/3] pwm: Fix division by 0 issues Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox