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

From: Ekansh Gupta

Date: Mon Jul 27 2026 - 01:02:51 EST


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