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

Sebastian Reichel <[email protected]> Tue, 21 Jul 2026 22:24:33 +0200
Newsgroups org.kernel.vger.linux-next,org.kernel.vger.linux-kernel
Message-ID <al_UHA6mYMSvcD7M@venus>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmpf1X0ACgkQ2O7X88g7
+ppIXBAAou4CZobyjySNF/qucbwndmQ3/yNWKpQNaUT2FdMeYkuC37Z7eC8CFTF+
YAJajyktKUtzUCCsiRYQFaa4b56IDgy9ZZUPrEPUTVeUvEm3DY1lOvo/OkxqtaK2
Jj4DcmOn86Nu+5ZiLG0dbL5rXUv9XoPEStz4B9i8EZYIhJxXJBjM0Lp26Vi1Xrk6
tohchtPqV2rH7CeGbzpmyq3etld5DsE3gzZ6hkZwN/7tn0oZ7DIiRs+Wgq/zdMfm
USLPKhvW23fEELpqx8GGmYMZ240q4n9Qvqtlt6VeW11NSM+XJhFRl6/8dz86w+Dy
NQP7T1rBTuGny2o8ji0erpGHyCLo0m1+5Vw03u6VUm4anYfLSs6zz4hsHeuUrTVN
4IHI6QxJriTivNH7khIomYrUT1EW+GqcIbj24ZwCxrCz6x9TJGTlxAnCcrAimVy9
LiXLw3t1SlsmyQCNL35IjMHiXchErVbAA3e3rRXAJ+2GfTm9DcyAWKJZ03Z2MP2o
BLNt3cMiwflhPE+UEKLw+1UesLl3hT2MRr/uX4Ww0YYDs/EzI9TBvE3lUksTMD0y
yAhzyOhGx5ax9dQvnm+KvDLcpD5gQlIrleQY1WvBqlWk4iTWfSPnb8OYk0qPIpTt
I7uLfQdPI3sUk3kBsuJin2Px3fRJVFyaLGmNW1kYQNDipFvAm/c=
=oGT3
-----END PGP SIGNATURE-----