Skip to content

Commit

Permalink
dsa: tag_brcm: Avoid unused symbols
Browse files Browse the repository at this point in the history
It is possible that the driver is compiled with both
CONFIG_NET_DSA_TAG_BRCM and CONFIG_NET_DSA_TAG_BRCM_PREPEND disabled.
This results in warnings about unused symbols. Add some conditional
compilation to avoid this.

Signed-off-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>

v2
Reorder patch to before tag drivers can be modules

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lunn authored and davem330 committed Apr 28, 2019
1 parent f81a43e commit 3aa475e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions net/dsa/tag_brcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
#define BRCM_EG_TC_MASK 0x7
#define BRCM_EG_PID_MASK 0x1f

#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM) || \
IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND)

static struct sk_buff *brcm_tag_xmit_ll(struct sk_buff *skb,
struct net_device *dev,
unsigned int offset)
Expand Down Expand Up @@ -139,8 +142,9 @@ static struct sk_buff *brcm_tag_rcv_ll(struct sk_buff *skb,

return skb;
}
#endif

#ifdef CONFIG_NET_DSA_TAG_BRCM
#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM)
static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb,
struct net_device *dev)
{
Expand Down Expand Up @@ -179,7 +183,7 @@ DSA_TAG_DRIVER(brcm_netdev_ops);
MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_BRCM);
#endif

#ifdef CONFIG_NET_DSA_TAG_BRCM_PREPEND
#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND)
static struct sk_buff *brcm_tag_xmit_prepend(struct sk_buff *skb,
struct net_device *dev)
{
Expand Down

0 comments on commit 3aa475e

Please sign in to comment.