Hi, On Tue, Jul 21, 2026 at 12:15:32PM -0500, Chris Morgan wrote: > On Tue, Jul 21, 2026 at 03:50:58PM +0100, Mark Brown wrote: > > 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. > > > > Sorry, I wasn't aware this was getting pulled for Linux next or I > would have noted that in the last revision I just sent. mh, looks like b4 ty did not generate a response to you. > I suspect I'm just missing a header here, which I am also missing > in V8 just submitted. I'll add an include for linux/bitfield.h in > revision 9 which I'll send just as soon in the next day or two > once I can get a code review from a human and from the sashiko.dev > code bot. I will drop the driver for now and wait for a v9. Greetings, -- Sebastian