linux-next: build failure after merge of the battery tree

From: Mark Brown

Date: Tue Jul 21 2026 - 10:53:10 EST


Hi all,

After merging the battery tree, today's linux-next build (x86_64
allmodconfig) failed like this:

/tmp/next/build/drivers/power/supply/sgm41542_charger.c:209:12: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
209 | reg_val = FIELD_PREP(SGM4154X_PRECHRG_CUR_MASK, reg_val);
| ^
/tmp/next/build/drivers/power/supply/sgm41542_charger.c:249:8: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
249 | val = FIELD_GET(SGM4154X_ICHRG_CUR_MASK, reg);
| ^
/tmp/next/build/drivers/power/supply/sgm41542_charger.c:271:12: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
271 | reg_val = FIELD_PREP(SGM4154X_VREG_V_MASK, reg_val);
| ^
/tmp/next/build/drivers/power/supply/sgm41542_charger.c:293:8: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
293 | val = FIELD_GET(SGM4154X_VREG_V_MASK, reg);
| ^
/tmp/next/build/drivers/power/supply/sgm41542_charger.c:452:9: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
452 | time = FIELD_PREP(SGM4154X_WDT_TIMER_MASK, time);
| ^
5 errors generated.


Caused by commit

ac55d04627d41 (power: supply: sgm41542: Add SG Micro sgm41542 charger)

I have used the version from next-20260720 instead.

Attachment: signature.asc
Description: PGP signature