Skip to contentSkip to conversation

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

DISCUSSION Mark Brown 3 participants 3 messages Jul 21 Linux-next tree

lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

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.

#1 lore raw
Quoted 23 lines · Mark Brown

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.

Quoted 6 lines

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. 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.

Thank you,
Chris

#2 lore raw

Hi,

Quoted 26 lines · Chris Morgan
Quoted 25 lines · Mark Brown

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

Quoted 7 lines
Quoted 4 lines

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.

Quoted 5 lines

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