Skip to content

Commit

Permalink
enic: Make dummy rfs functions inline to fix !CONFIG_RFS_ACCEL build
Browse files Browse the repository at this point in the history
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 <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Geert Uytterhoeven authored and David S. Miller committed Jun 26, 2014
1 parent a6eacef commit 644a918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 0 additions & 10 deletions drivers/net/ethernet/cisco/enic/enic_clsf.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,14 +266,4 @@ int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
return res;
}

#else

void enic_rfs_flw_tbl_init(struct enic *enic)
{
}

void enic_rfs_flw_tbl_free(struct enic *enic)
{
}

#endif /* CONFIG_RFS_ACCEL */
3 changes: 3 additions & 0 deletions drivers/net/ethernet/cisco/enic/enic_clsf.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ void enic_rfs_flw_tbl_init(struct enic *enic);
void enic_rfs_flw_tbl_free(struct enic *enic);
int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
u16 rxq_index, u32 flow_id);
#else
static inline void enic_rfs_flw_tbl_init(struct enic *enic) {}
static inline void enic_rfs_flw_tbl_free(struct enic *enic) {}
#endif /* CONFIG_RFS_ACCEL */

#endif /* _ENIC_CLSF_H_ */

0 comments on commit 644a918

Please sign in to comment.