All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH v2 net-next 13/14] dsa: tag_brcm: Avoid unused symbols
Date: Tue, 23 Apr 2019 02:22:56 +0200	[thread overview]
Message-ID: <20190423002257.3220-14-andrew@lunn.ch> (raw)
In-Reply-To: <20190423002257.3220-1-andrew@lunn.ch>

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
---
 net/dsa/tag_brcm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c
index 9890097a85d9..d52db5f2c721 100644
--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -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)
@@ -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)
 {
@@ -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)
 {
-- 
2.20.1


  parent reply	other threads:[~2019-04-23  0:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23  0:22 [PATCH v2 net-next 00/14] Make DSA tag drivers kernel modules Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 01/14] dsa: Add SPDX header to tag drivers Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 02/14] dsa: Move tagger name into its ops structure Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 03/14] dsa: Add MODULE_ALIAS to taggers in preparation to become modules Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 04/14] dsa: Add MODULE_LICENSE to tag drivers Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 05/14] dsa: Add TAG protocol to tag ops Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 06/14] dsa: Add boilerplate helper to register DSA tag driver modules Andrew Lunn
2019-04-23 23:52   ` Jakub Kicinski
2019-04-23  0:22 ` [PATCH v2 net-next 07/14] dsa: Keep link list of tag drivers Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 08/14] dsa: Register the none tagger ops Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 09/14] dsa: Rename dsa_resolve_tag_protocol() to _get ready for locking Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 10/14] dsa: Add stub tag driver put method Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 11/14] dsa: Make use of the list of tag drivers Andrew Lunn
2019-04-23  0:22 ` [PATCH v2 net-next 12/14] dsa: Cleanup unneeded table and make tag structures static Andrew Lunn
2019-04-23  0:22 ` Andrew Lunn [this message]
2019-04-23  0:22 ` [PATCH v2 net-next 14/14] dsa: Allow tag drivers to be built as modules Andrew Lunn
2019-04-23  1:03   ` Randy Dunlap
2019-04-23 23:59 ` [PATCH v2 net-next 00/14] Make DSA tag drivers kernel modules Jakub Kicinski
2019-04-24  0:13 ` David Miller
2019-04-24 12:39   ` Andrew Lunn
2019-04-24 20:45 ` Vivien Didelot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423002257.3220-14-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.