Commit 3aa475e197f44ae401502b61aa341d3e40aa045a

Authored by Andrew Lunn
Committed by David S. Miller
1 parent f81a43e8da

dsa: tag_brcm: Avoid unused symbols

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 <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

v2
Reorder patch to before tag drivers can be modules

Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff

... ... @@ -55,6 +55,9 @@
55 55 #define BRCM_EG_TC_MASK 0x7
56 56 #define BRCM_EG_PID_MASK 0x1f
57 57  
  58 +#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM) || \
  59 + IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND)
  60 +
58 61 static struct sk_buff *brcm_tag_xmit_ll(struct sk_buff *skb,
59 62 struct net_device *dev,
60 63 unsigned int offset)
61 64  
... ... @@ -139,8 +142,9 @@
139 142  
140 143 return skb;
141 144 }
  145 +#endif
142 146  
143   -#ifdef CONFIG_NET_DSA_TAG_BRCM
  147 +#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM)
144 148 static struct sk_buff *brcm_tag_xmit(struct sk_buff *skb,
145 149 struct net_device *dev)
146 150 {
... ... @@ -179,7 +183,7 @@
179 183 MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_BRCM);
180 184 #endif
181 185  
182   -#ifdef CONFIG_NET_DSA_TAG_BRCM_PREPEND
  186 +#if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM_PREPEND)
183 187 static struct sk_buff *brcm_tag_xmit_prepend(struct sk_buff *skb,
184 188 struct net_device *dev)
185 189 {