Subject: Re: linux-next: build failure after merge of the drivers-x86 tree

From: Kees Cook <[email-masked]>
Date: Wed, 14 Jan 2026 19:54:40 -0800

On Thu, Jan 15, 2026 at 02:52:44PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the drivers-x86 tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/platform/x86/lenovo/thinkpad_acpi.c: In function 'display_damage':
> drivers/platform/x86/lenovo/thinkpad_acpi.c:11134:23: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
> 11134 |         port_status = FIELD_GET(PORT_STATUS, dmg_status);
>       |                       ^~~~~~~~~
> 
> Caused by commits
> 
>   f6b6ce566954 ("platform/x86: thinkpad_acpi: Add support to detect hardware damage detection capability.")
>   520448bb6f09 ("platform/x86: thinkpad_acpi: Add sysfs to display details of damaged device.")
> 
> and probably exposed by commit
> 
>   5523dcfa4f59 ("Fortify: Use C arithmetic not FIELD_xxx() in FORTIFY_REASON defines")
> 
> from the kspp tree which removed the include of bitfield.h from
> fortify-string.h.  I wonder if this will affect any other (more exotic)
> builds?
> 
> I have applied the following patch for today, and this (or something
> like it) should probably be applied to the drivers-x86 tree.
> 
> From: Stephen Rothwell <[email-masked]>
> Date: Thu, 15 Jan 2026 14:17:35 +1100
> Subject: [PATCH] fix up for "Fortify: Use C arithmetic not FIELD_xxx() in
>  FORTIFY_REASON defines"
> 
> interacting with commits
> 
>   f6b6ce566954 ("platform/x86: thinkpad_acpi: Add support to detect hardware dam
> age detection capability.")
>   520448bb6f09 ("platform/x86: thinkpad_acpi: Add sysfs to display details of da
> maged device.")
> 
> from the drivers-x86 tree.
> 
> Signed-off-by: Stephen Rothwell <[email-masked]>
> ---
>  drivers/platform/x86/lenovo/thinkpad_acpi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index 95755fa1e008..a272f27e6227 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> @@ -36,6 +36,7 @@
>  
>  #include <linux/acpi.h>
>  #include <linux/backlight.h>
> +#include <linux/bitfield.h>
>  #include <linux/bitops.h>
>  #include <linux/delay.h>
>  #include <linux/dmi.h>

Ah! Thanks -- this looks correct to me.

I will run some randconfigs to see if anything pops out.

-- 
Kees Cook