Skip to content

Commit 1fe8304

Browse files
anguy11gregkh
authored andcommitted
i40e: Include types.h to some headers
[ Upstream commit 9cfd3b5 ] Commit 56df345 ("i40e: Remove circular header dependencies and fix headers") redistributed a number of includes from one large header file to the locations they were needed. In some environments, types.h is not included and causing compile issues. The driver should not rely on implicit inclusion from other locations; explicitly include it to these files. Snippet of issue. Entire log can be seen through the Closes: link. In file included from drivers/net/ethernet/intel/i40e/i40e_diag.h:7, from drivers/net/ethernet/intel/i40e/i40e_diag.c:4: drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:33:9: error: unknown type name '__le16' 33 | __le16 flags; | ^~~~~~ drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h:34:9: error: unknown type name '__le16' 34 | __le16 opcode; | ^~~~~~ ... drivers/net/ethernet/intel/i40e/i40e_diag.h:22:9: error: unknown type name 'u32' 22 | u32 elements; /* number of elements if array */ | ^~~ drivers/net/ethernet/intel/i40e/i40e_diag.h:23:9: error: unknown type name 'u32' 23 | u32 stride; /* bytes between each element */ Reported-by: Martin Zaharinov <[email protected]> Closes: https://lore.kernel.org/netdev/[email protected]/ Fixes: 56df345 ("i40e: Remove circular header dependencies and fix headers") Reviewed-by: Jesse Brandeburg <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Arpana Arland <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f717743 commit 1fe8304

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#define _I40E_ADMINQ_CMD_H_
66

77
#include <linux/bits.h>
8+
#include <linux/types.h>
89

910
/* This header file defines the i40e Admin Queue commands and is shared between
1011
* i40e Firmware and Software.

drivers/net/ethernet/intel/i40e/i40e_diag.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#ifndef _I40E_DIAG_H_
55
#define _I40E_DIAG_H_
66

7+
#include <linux/types.h>
78
#include "i40e_adminq_cmd.h"
89

910
/* forward-declare the HW struct for the compiler */

0 commit comments

Comments
 (0)