drivers/platform/mellanox/mlxbf-bootctl.c | 1 + 1 file changed, 1 insertion(+)
rsh_log_store() calls the FIELD_PREP() macro without including the
required header file, resulting a build error:
CC drivers/platform/mellanox/mlxbf-bootctl.o
drivers/platform/mellanox/mlxbf-bootctl.c: In function ‘rsh_log_store’:
drivers/platform/mellanox/mlxbf-bootctl.c:429:16: error: implicit declaration of function ‘FIELD_PREP’ [-Wimplicit-function-declaration]
429 | data = FIELD_PREP(MLXBF_RSH_LOG_TYPE_MASK, MLXBF_RSH_LOG_TYPE_MSG);
| ^~~~~~~~~~
Fix this by including the <linux/bitfield.h> file.
Fixes: e9d1b2d0f7d0 ("mlxbf-bootctl: Add sysfs file for BlueField boot log")
Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
---
drivers/platform/mellanox/mlxbf-bootctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/mellanox/mlxbf-bootctl.c b/drivers/platform/mellanox/mlxbf-bootctl.c
index f67c7f56ab2b..9ddc7fa1a973 100644
--- a/drivers/platform/mellanox/mlxbf-bootctl.c
+++ b/drivers/platform/mellanox/mlxbf-bootctl.c
@@ -10,6 +10,7 @@
#include <linux/acpi.h>
#include <linux/arm-smccc.h>
+#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/if_ether.h>
#include <linux/iopoll.h>
---
base-commit: 36b1d3299d0b6aa51485cc9a79b8d94948d5f3d4
change-id: 20260810-mellanox_fix_implicit_declaration-b3be803cbe94
Best regards,
--
Nikolay Kulikov <nikolayof23@gmail.com>
On Mon, 10 Aug 2026 22:10:02 +0300, Nikolay Kulikov wrote:
> rsh_log_store() calls the FIELD_PREP() macro without including the
> required header file, resulting a build error:
>
> CC drivers/platform/mellanox/mlxbf-bootctl.o
> drivers/platform/mellanox/mlxbf-bootctl.c: In function ‘rsh_log_store’:
> drivers/platform/mellanox/mlxbf-bootctl.c:429:16: error: implicit declaration of function ‘FIELD_PREP’ [-Wimplicit-function-declaration]
> 429 | data = FIELD_PREP(MLXBF_RSH_LOG_TYPE_MASK, MLXBF_RSH_LOG_TYPE_MSG);
> | ^~~~~~~~~~
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/1] mlxbf-bootctl: fix the build error with FIELD_PREP()
commit: cb361aba6ac9a7d336e4b6e503fec6d84851e709
--
i.
© 2016 - 2026 Red Hat, Inc.