Re: [PATCH net-next v2 2/2] net: dsa: realtek: rtl8365mb: add EEE support

From: Jakub Kicinski

Date: Mon Sep 07 2026 - 20:37:25 EST


On Thu, 3 Sep 2026 11:22:11 +0200 Oleksij Rempel wrote:
> Add EEE support on the integrated-PHY ports, controllable per port via
> ethtool.

Looks like clang is doing more aggressive inlining here because build
fails with:

../drivers/net/dsa/realtek/rtl8365mb_main.c:894:9: error: call to '__compiletime_assert_1481' declared with 'error' attribute: FIELD_PREP: value too large for the field
894 | val |= FIELD_PREP(RTL8365MB_INDIRECT_ACCESS_ADDRESS_OCPADR_5_1_MASK,
| ^
../include/linux/bitfield.h:138:3: note: expanded from macro 'FIELD_PREP'
138 | __FIELD_PREP(_mask, _val, "FIELD_PREP: "); \
| ^
../include/linux/bitfield.h:91:3: note: expanded from macro '__FIELD_PREP'
91 | __BF_FIELD_CHECK_MASK(mask, val, pfx); \
| ^
../include/linux/bitfield.h:70:3: note: expanded from macro '__BF_FIELD_CHECK_MASK'
70 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
| ^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
./../include/linux/compiler_types.h:690:2: note: expanded from macro '_compiletime_assert'
690 | __compiletime_assert(condition, msg, prefix, suffix)
| ^
./../include/linux/compiler_types.h:683:4: note: expanded from macro '__compiletime_assert'
683 | prefix ## suffix(); \
| ^
<scratch space>:18:1: note: expanded from here
18 | __compiletime_assert_1481
| ^

Looks legit at a glance. Maybe the addrs you're defining should be
relative to RTL8365MB_PHY_OCP_ADDR_PHYREG_BASE ?