Re: [PATCH v1] misc: fastrpc: Add missing <linux/bitfield.h> include

From: Srinivas Kandagatla

Date: Mon Jul 27 2026 - 05:33:42 EST




On 7/27/26 6:02 AM, Ekansh Gupta wrote:
> Commit 10555ba6126ed ("misc: fastrpc: Replace hardcoded ctxid mask with
> GENMASK") introduced uses of FIELD_GET() and FIELD_PREP() but omitted
> the header that defines them. This causes build failures on x86_64
> allmodconfig:
>
> drivers/misc/fastrpc.c: error: call to undeclared function 'FIELD_GET'
> drivers/misc/fastrpc.c: error: call to undeclared function 'FIELD_PREP'
>
> The missing declaration also causes a secondary -Wformat error because
> the compiler treats the implicit FIELD_GET() as returning int, which
> mismatches the %llx format specifier used in the dev_dbg() call.
>
> Fix by adding #include <linux/bitfield.h>.
>
> Fixes: 10555ba6126ed ("misc: fastrpc: Replace hardcoded ctxid mask with GENMASK")
> Cc: stable@xxxxxxxxxx

Was this reported by some test bot ? if yes, please add Reported by and
Closes tag.

--srini
> Signed-off-by: Ekansh Gupta <ekansh.gupta@xxxxxxxxxxxxxxxx>
> ---
> drivers/misc/fastrpc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
> index 94681394c1a0..017334ea4f34 100644
> --- a/drivers/misc/fastrpc.c
> +++ b/drivers/misc/fastrpc.c
> @@ -22,6 +22,7 @@
> #include <linux/firmware/qcom/qcom_scm.h>
> #include <uapi/misc/fastrpc.h>
> #include <linux/of_reserved_mem.h>
> +#include <linux/bitfield.h>
> #include <linux/bits.h>
> #include <linux/bitops.h>
> #include <linux/compiler.h>