Skip to content

Commit 644a918

Browse files
geertudavem330
authored andcommitted
enic: Make dummy rfs functions inline to fix !CONFIG_RFS_ACCEL build
If CONFIG_RFS_ACCEL=n: drivers/net/ethernet/cisco/enic/enic_main.c: In function 'enic_open': drivers/net/ethernet/cisco/enic/enic_main.c:1603:2: error: implicit declaration of function 'enic_rfs_flw_tbl_init' [-Werror=implicit-function-declaration] drivers/net/ethernet/cisco/enic/enic_main.c: In function 'enic_stop': drivers/net/ethernet/cisco/enic/enic_main.c:1630:2: error: implicit declaration of function 'enic_rfs_flw_tbl_free' [-Werror=implicit-function-declaration] Introduced in commit a145df2 ("enic: Add Accelerated RFS support"). Dummy functions are provided, but their prototypes are missing, causing the build failure. Provide dummy static inline functions instead to fix this. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a6eacef commit 644a918

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

drivers/net/ethernet/cisco/enic/enic_clsf.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,4 @@ int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
266266
return res;
267267
}
268268

269-
#else
270-
271-
void enic_rfs_flw_tbl_init(struct enic *enic)
272-
{
273-
}
274-
275-
void enic_rfs_flw_tbl_free(struct enic *enic)
276-
{
277-
}
278-
279269
#endif /* CONFIG_RFS_ACCEL */

drivers/net/ethernet/cisco/enic/enic_clsf.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ void enic_rfs_flw_tbl_init(struct enic *enic);
1414
void enic_rfs_flw_tbl_free(struct enic *enic);
1515
int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
1616
u16 rxq_index, u32 flow_id);
17+
#else
18+
static inline void enic_rfs_flw_tbl_init(struct enic *enic) {}
19+
static inline void enic_rfs_flw_tbl_free(struct enic *enic) {}
1720
#endif /* CONFIG_RFS_ACCEL */
1821

1922
#endif /* _ENIC_CLSF_H_ */

0 commit comments

Comments
 (0)