diff mbox

enic: fix a building failure

Message ID 1403834979-598-1-git-send-email-roy.qing.li@gmail.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Li RongQing June 27, 2014, 2:09 a.m. UTC
From: Li RongQing <roy.qing.li@gmail.com>

When RFS_ACCEL is disabled, the building failed:
    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]
      enic_rfs_flw_tbl_init(enic);
      ^
    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]
      enic_rfs_flw_tbl_free(enic);

In fact, these two functions have been defined separately for enabling RFS_ACCEL
and disabling RFS_ACCEL.

Reported-by: Jim Davis <jim.epost@gmail.com>
Cc: Govindarajulu Varadarajan <_govind@gmx.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
 drivers/net/ethernet/cisco/enic/enic_clsf.h |    3 ---
 1 file changed, 3 deletions(-)

Comments

Li RongQing June 27, 2014, 2:20 a.m. UTC | #1
On Fri, Jun 27, 2014 at 10:09 AM,  <roy.qing.li@gmail.com> wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>

It is for net-next.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller June 27, 2014, 2:21 a.m. UTC | #2
From: roy.qing.li@gmail.com

Date: Fri, 27 Jun 2014 10:09:39 +0800

> From: Li RongQing <roy.qing.li@gmail.com>

> 

> When RFS_ACCEL is disabled, the building failed:

>     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]

>       enic_rfs_flw_tbl_init(enic);

>       ^

>     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]

>       enic_rfs_flw_tbl_free(enic);

> 

> In fact, these two functions have been defined separately for enabling RFS_ACCEL

> and disabling RFS_ACCEL.

> 

> Reported-by: Jim Davis <jim.epost@gmail.com>

> Cc: Govindarajulu Varadarajan <_govind@gmx.com>

> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>


Please pay attention, there is already a better fix checked into the
net-next tree.

The tree would still fail with your version of the fix, did you test
with RFS_ACCEL disabled?  You have to provide an actual implementation
when RFC_ACCEL is off, via an empty inline function in enic_clsf.h which is
what was done in net-next already.
diff mbox

Patch

diff --git a/drivers/net/ethernet/cisco/enic/enic_clsf.h b/drivers/net/ethernet/cisco/enic/enic_clsf.h
index 76a85bb..b38cc7e 100644
--- a/drivers/net/ethernet/cisco/enic/enic_clsf.h
+++ b/drivers/net/ethernet/cisco/enic/enic_clsf.h
@@ -9,11 +9,8 @@ 
 int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq);
 int enic_delfltr(struct enic *enic, u16 filter_id);
 
-#ifdef CONFIG_RFS_ACCEL
 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);
-#endif /* CONFIG_RFS_ACCEL */
-
 #endif /* _ENIC_CLSF_H_ */