[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <173367713788.1031947.8609520201420590738.b4-ty@kernel.org>
Date: Sun, 08 Dec 2024 22:28:57 +0530
From: Vinod Koul <vkoul@...nel.org>
To: Christian Bruel <christian.bruel@...s.st.com>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Arnd Bergmann <arnd@...nel.org>
Cc: Arnd Bergmann <arnd@...db.de>, Yang Li <yang.lee@...ux.alibaba.com>,
linux-phy@...ts.infradead.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] phy: stm32: work around constant-value overflow
assertion
On Mon, 11 Nov 2024 11:37:02 +0100, Arnd Bergmann wrote:
> FIELD_PREP() checks that a constant fits into the available bitfield,
> but if one of the two lookup tables in stm32_impedance_tune() does
> not find a matching entry, the index is out of range, which gcc
> correctly complains about:
>
> In file included from <command-line>:
> In function 'stm32_impedance_tune',
> inlined from 'stm32_combophy_pll_init' at drivers/phy/st/phy-stm32-combophy.c:247:9:
> include/linux/compiler_types.h:517:38: error: call to '__compiletime_assert_447' declared with attribute error: FIELD_PREP: value too large for the field
> 517 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> | ^
> include/linux/bitfield.h:68:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> 68 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
> 115 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
> | ^~~~~~~~~~~~~~~~
> drivers/phy/st/phy-stm32-combophy.c:162:8: note: in expansion of macro 'FIELD_PREP'
> 162 | FIELD_PREP(STM32MP25_PCIEPRG_IMPCTRL_VSWING, vswing_of));
> | ^~~~~~~~~~
>
> [...]
Applied, thanks!
[1/1] phy: stm32: work around constant-value overflow assertion
commit: 2de679ecd724b823c2cb58caab8508c7eec8aefc
Best regards,
--
~Vinod
Powered by blists - more mailing lists