All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: dsa: unexport dsa_is_port_initialized
@ 2017-07-18 20:23 Vivien Didelot
  2017-07-19 23:28 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Vivien Didelot @ 2017-07-18 20:23 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, kernel, David S. Miller, Florian Fainelli,
	Andrew Lunn, Vivien Didelot

The dsa_is_port_initialized helper is only used by dsa_switch_resume and
dsa_switch_suspend, if CONFIG_PM_SLEEP is enabled. Make it static to
dsa.c.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 include/net/dsa.h | 5 -----
 net/dsa/dsa.c     | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/net/dsa.h b/include/net/dsa.h
index 58969b9a090c..88da272d20d0 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -256,11 +256,6 @@ static inline bool dsa_is_normal_port(struct dsa_switch *ds, int p)
 	return !dsa_is_cpu_port(ds, p) && !dsa_is_dsa_port(ds, p);
 }
 
-static inline bool dsa_is_port_initialized(struct dsa_switch *ds, int p)
-{
-	return ds->enabled_port_mask & (1 << p) && ds->ports[p].netdev;
-}
-
 static inline u8 dsa_upstream_port(struct dsa_switch *ds)
 {
 	struct dsa_switch_tree *dst = ds->dst;
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 416ac4ef9ba9..a55e2e4087a4 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -220,6 +220,11 @@ static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
 }
 
 #ifdef CONFIG_PM_SLEEP
+static bool dsa_is_port_initialized(struct dsa_switch *ds, int p)
+{
+	return ds->enabled_port_mask & (1 << p) && ds->ports[p].netdev;
+}
+
 int dsa_switch_suspend(struct dsa_switch *ds)
 {
 	int i, ret = 0;
-- 
2.13.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: dsa: unexport dsa_is_port_initialized
  2017-07-18 20:23 [PATCH net-next] net: dsa: unexport dsa_is_port_initialized Vivien Didelot
@ 2017-07-19 23:28 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-07-19 23:28 UTC (permalink / raw)
  To: vivien.didelot; +Cc: netdev, linux-kernel, kernel, f.fainelli, andrew

From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Date: Tue, 18 Jul 2017 16:23:56 -0400

> The dsa_is_port_initialized helper is only used by dsa_switch_resume and
> dsa_switch_suspend, if CONFIG_PM_SLEEP is enabled. Make it static to
> dsa.c.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-19 23:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-18 20:23 [PATCH net-next] net: dsa: unexport dsa_is_port_initialized Vivien Didelot
2017-07-19 23:28 ` David Miller

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.