All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: f.fainelli@gmail.com, vivien.didelot@gmail.com, andrew@lunn.ch,
	davem@davemloft.net
Cc: netdev@vger.kernel.org, Vladimir Oltean <olteanv@gmail.com>
Subject: [PATCH net-next 01/10] net: dsa: sja1105: Build PTP support in main DSA driver
Date: Wed, 26 Jun 2019 02:39:33 +0300	[thread overview]
Message-ID: <20190625233942.1946-2-olteanv@gmail.com> (raw)
In-Reply-To: <20190625233942.1946-1-olteanv@gmail.com>

As Arnd Bergmann pointed out in commit 78fe8a28fb96 ("net: dsa: sja1105:
fix ptp link error"), there is no point in having PTP support as a
separate loadable kernel module.

So remove the exported symbols and make sja1105.ko contain PTP support
or not based on CONFIG_NET_DSA_SJA1105_PTP.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
---
 drivers/net/dsa/sja1105/Makefile                |  2 +-
 drivers/net/dsa/sja1105/sja1105_ptp.c           | 12 ------------
 drivers/net/dsa/sja1105/sja1105_spi.c           |  2 --
 drivers/net/dsa/sja1105/sja1105_static_config.c |  3 ---
 4 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/net/dsa/sja1105/Makefile b/drivers/net/dsa/sja1105/Makefile
index 9a22f68b39e9..4483113e6259 100644
--- a/drivers/net/dsa/sja1105/Makefile
+++ b/drivers/net/dsa/sja1105/Makefile
@@ -10,5 +10,5 @@ sja1105-objs := \
     sja1105_dynamic_config.o \
 
 ifdef CONFIG_NET_DSA_SJA1105_PTP
-obj-$(CONFIG_NET_DSA_SJA1105) += sja1105_ptp.o
+sja1105-objs += sja1105_ptp.o
 endif
diff --git a/drivers/net/dsa/sja1105/sja1105_ptp.c b/drivers/net/dsa/sja1105/sja1105_ptp.c
index 3041cf9d5856..c7ce1edd8471 100644
--- a/drivers/net/dsa/sja1105/sja1105_ptp.c
+++ b/drivers/net/dsa/sja1105/sja1105_ptp.c
@@ -77,7 +77,6 @@ int sja1105_get_ts_info(struct dsa_switch *ds, int port,
 	info->phc_index = ptp_clock_index(priv->clock);
 	return 0;
 }
-EXPORT_SYMBOL_GPL(sja1105_get_ts_info);
 
 int sja1105et_ptp_cmd(const void *ctx, const void *data)
 {
@@ -95,7 +94,6 @@ int sja1105et_ptp_cmd(const void *ctx, const void *data)
 	return sja1105_spi_send_packed_buf(priv, SPI_WRITE, regs->ptp_control,
 					   buf, SJA1105_SIZE_PTP_CMD);
 }
-EXPORT_SYMBOL_GPL(sja1105et_ptp_cmd);
 
 int sja1105pqrs_ptp_cmd(const void *ctx, const void *data)
 {
@@ -113,7 +111,6 @@ int sja1105pqrs_ptp_cmd(const void *ctx, const void *data)
 	return sja1105_spi_send_packed_buf(priv, SPI_WRITE, regs->ptp_control,
 					   buf, SJA1105_SIZE_PTP_CMD);
 }
-EXPORT_SYMBOL_GPL(sja1105pqrs_ptp_cmd);
 
 /* The switch returns partial timestamps (24 bits for SJA1105 E/T, which wrap
  * around in 0.135 seconds, and 32 bits for P/Q/R/S, wrapping around in 34.35
@@ -146,7 +143,6 @@ u64 sja1105_tstamp_reconstruct(struct sja1105_private *priv, u64 now,
 
 	return ts_reconstructed;
 }
-EXPORT_SYMBOL_GPL(sja1105_tstamp_reconstruct);
 
 /* Reads the SPI interface for an egress timestamp generated by the switch
  * for frames sent using management routes.
@@ -219,7 +215,6 @@ int sja1105_ptpegr_ts_poll(struct sja1105_private *priv, int port, u64 *ts)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(sja1105_ptpegr_ts_poll);
 
 int sja1105_ptp_reset(struct sja1105_private *priv)
 {
@@ -240,7 +235,6 @@ int sja1105_ptp_reset(struct sja1105_private *priv)
 
 	return rc;
 }
-EXPORT_SYMBOL_GPL(sja1105_ptp_reset);
 
 static int sja1105_ptp_gettime(struct ptp_clock_info *ptp,
 			       struct timespec64 *ts)
@@ -387,7 +381,6 @@ int sja1105_ptp_clock_register(struct sja1105_private *priv)
 
 	return sja1105_ptp_reset(priv);
 }
-EXPORT_SYMBOL_GPL(sja1105_ptp_clock_register);
 
 void sja1105_ptp_clock_unregister(struct sja1105_private *priv)
 {
@@ -397,8 +390,3 @@ void sja1105_ptp_clock_unregister(struct sja1105_private *priv)
 	ptp_clock_unregister(priv->clock);
 	priv->clock = NULL;
 }
-EXPORT_SYMBOL_GPL(sja1105_ptp_clock_unregister);
-
-MODULE_AUTHOR("Vladimir Oltean <olteanv@gmail.com>");
-MODULE_DESCRIPTION("SJA1105 PHC Driver");
-MODULE_LICENSE("GPL v2");
diff --git a/drivers/net/dsa/sja1105/sja1105_spi.c b/drivers/net/dsa/sja1105/sja1105_spi.c
index f7e51debb930..84dc603138cf 100644
--- a/drivers/net/dsa/sja1105/sja1105_spi.c
+++ b/drivers/net/dsa/sja1105/sja1105_spi.c
@@ -100,7 +100,6 @@ int sja1105_spi_send_packed_buf(const struct sja1105_private *priv,
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(sja1105_spi_send_packed_buf);
 
 /* If @rw is:
  * - SPI_WRITE: creates and sends an SPI write message at absolute
@@ -136,7 +135,6 @@ int sja1105_spi_send_int(const struct sja1105_private *priv,
 
 	return rc;
 }
-EXPORT_SYMBOL_GPL(sja1105_spi_send_int);
 
 /* Should be used if a @packed_buf larger than SJA1105_SIZE_SPI_MSG_MAXLEN
  * must be sent/received. Splitting the buffer into chunks and assembling
diff --git a/drivers/net/dsa/sja1105/sja1105_static_config.c b/drivers/net/dsa/sja1105/sja1105_static_config.c
index 58f273eaf1ea..242f001c59fe 100644
--- a/drivers/net/dsa/sja1105/sja1105_static_config.c
+++ b/drivers/net/dsa/sja1105/sja1105_static_config.c
@@ -35,7 +35,6 @@ void sja1105_pack(void *buf, const u64 *val, int start, int end, size_t len)
 	}
 	dump_stack();
 }
-EXPORT_SYMBOL_GPL(sja1105_pack);
 
 void sja1105_unpack(const void *buf, u64 *val, int start, int end, size_t len)
 {
@@ -53,7 +52,6 @@ void sja1105_unpack(const void *buf, u64 *val, int start, int end, size_t len)
 		       start, end);
 	dump_stack();
 }
-EXPORT_SYMBOL_GPL(sja1105_unpack);
 
 void sja1105_packing(void *buf, u64 *val, int start, int end,
 		     size_t len, enum packing_op op)
@@ -76,7 +74,6 @@ void sja1105_packing(void *buf, u64 *val, int start, int end,
 	}
 	dump_stack();
 }
-EXPORT_SYMBOL_GPL(sja1105_packing);
 
 /* Little-endian Ethernet CRC32 of data packed as big-endian u32 words */
 u32 sja1105_crc32(const void *buf, size_t len)
-- 
2.17.1


  reply	other threads:[~2019-06-25 23:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 23:39 [PATCH net-next 00/10] FDB, VLAN and PTP fixes for SJA1105 DSA Vladimir Oltean
2019-06-25 23:39 ` Vladimir Oltean [this message]
2019-06-26  0:25   ` [PATCH net-next 01/10] net: dsa: sja1105: Build PTP support in main DSA driver Willem de Bruijn
2019-06-25 23:39 ` [PATCH net-next 02/10] net: dsa: sja1105: Cancel PTP delayed work on unregister Vladimir Oltean
2019-06-26  0:11   ` Willem de Bruijn
2019-06-25 23:39 ` [PATCH net-next 03/10] net: dsa: sja1105: Make vid 1 the default pvid Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 04/10] net: dsa: sja1105: Actually implement the P/Q/R/S FDB bits Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 05/10] net: dsa: sja1105: Make P/Q/R/S learn MAC addresses Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 06/10] net: dsa: sja1105: Back up static FDB entries in kernel memory Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 07/10] net: dsa: sja1105: Add a high-level overview of the dynamic config interface Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 08/10] net: dsa: sja1105: Populate is_static for FDB entries on P/Q/R/S Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 09/10] net: dsa: sja1105: Use correct dsa_8021q VIDs for FDB commands Vladimir Oltean
2019-06-25 23:39 ` [PATCH net-next 10/10] net: dsa: sja1105: Implement is_static for FDB entries on E/T Vladimir Oltean
2019-06-27 18:04 ` [PATCH net-next 00/10] FDB, VLAN and PTP fixes for SJA1105 DSA David Miller

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=20190625233942.1946-2-olteanv@gmail.com \
    --to=olteanv@gmail.com \
    --cc=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.