net: enetc: fix implicit declaration of function FIELD_PREP
Wei Fang
maintainerPATCH 1/1 net: enetc: fix implicit declaration of function FIELD_PREP
The kernel test robot reported the following error:
drivers/net/ethernet/freescale/enetc/ntmp.c: In function 'ntmp_fill_request_hdr':drivers/net/ethernet/freescale/enetc/ntmp.c:203:38: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
203 | cbd->req_hdr.access_method = FIELD_PREP(NTMP_ACCESS_METHOD,
| ^~~~~~~~~~
Therefore, add "bitfield.h" to ntmp_private.h to fix this issue.
--- drivers/net/ethernet/freescale/enetc/ntmp_private.h | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/freescale/enetc/ntmp_private.h +1 -0
@@ -7,6 +7,7 @@#ifndef __NTMP_PRIVATE_H#define __NTMP_PRIVATE_H +#include <linux/bitfield.h> #include <linux/fsl/ntmp.h> #define NTMP_EID_REQ_LEN 8
Signature · 1 line
2.34.1
Quoted 8 lines · Wei Fang
The kernel test robot reported the following error:
drivers/net/ethernet/freescale/enetc/ntmp.c: In function 'ntmp_fill_request_hdr':drivers/net/ethernet/freescale/enetc/ntmp.c:203:38: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
203 |cbd->req_hdr.access_method= FIELD_PREP(NTMP_ACCESS_METHOD,
| ^~~~~~~~~~
Quoted 7 lines
Therefore, add "
bitfield.h" tontmp_private.hto fix this issue.Fixes 4701073c3deb ("net: enetc: add initial netc-lib driver to support NTMP")Reported-by kernel test robot <[email protected]>Signed-off-by Wei Fang <[email protected]>---
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:
Quoted 9 lines · On Mon, 12 May 2025 14:17:01 +0800 you wrote:
The kernel test robot reported the following error:
drivers/net/ethernet/freescale/enetc/ntmp.c: In function 'ntmp_fill_request_hdr':drivers/net/ethernet/freescale/enetc/ntmp.c:203:38: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
203 |cbd->req_hdr.access_method= FIELD_PREP(NTMP_ACCESS_METHOD,
| ^~~~~~~~~~[...]
Here is the summary with links:
- [net-next] net: enetc: fix implicit declaration of function FIELD_PREP
https://git.kernel.org/netdev/net-next/c/664bf117a308
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html