Re: [tip: objtool/urgent] objtool, pwm: mediatek: Prevent theoretical divide-by-zero in pwm_mediatek_config()
From: Josh Poimboeuf
Date: Thu Mar 27 2025 - 01:44:12 EST
On Wed, Mar 26, 2025 at 11:35:28AM +0100, Uwe Kleine-König wrote:
> I wonder a bit about procedures here. While I like that warnings that
> pop up in drivers/pwm (and elsewhere) are cared for, I think that the
> sensible way to change warning related settings is to make it hard to
> enable them first (harder than "depends on !COMPILE_TEST" "To avoid
> breaking bots too badly") and then work on the identified problems
> before warning broadly. The way chosen here instead seems to be enabling
> the warning immediately and then post fixes to the warnings and merge
> them without respective maintainer feedback in less than 12 hours.
Actually, this type of warning has existed for years. Nothing in the
recent objtool patches enabled it.
I only discovered this particular one a few days ago. I suspect it only
exists with newer compilers.
> I fail to reproduce the warning here for an x86_64 build on
> 1e26c5e28ca5. I have:
>
> $ grep -E 'CONFIG_(CLK|PWM_MEDIATEK|OBJTOOL_WERROR)\>' .config
> CONFIG_PWM_MEDIATEK=m
> CONFIG_OBJTOOL_WERROR=y
>
> and the build works fine for me and there is no warning about
> drivers/pwm/pwm-mediatek.o. What am I missing?
Sorry, I should have given more details about that. It was likely
something with KCOV and/or UBSAN, though I can't seem to recreate it at
the moment either :-/
--
Josh