netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next 1/2]: stmmac: make ethtool functions local
  2010-10-14  0:50 [PATCH net-next 1/2]: stmmac: make ethtool functions local Stephen Hemminger
@ 2010-10-13 21:35 ` Gustavo F. Padovan
  2010-10-14  0:51 ` [PATCH net-next 2/2] stmmac: make function tables const Stephen Hemminger
  2010-10-16 18:57 ` [PATCH net-next 1/2]: stmmac: make ethtool functions local David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Gustavo F. Padovan @ 2010-10-13 21:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, Giuseppe Cavallaro, Deepak SIKRI, netdev

* Stephen Hemminger <shemminger@vyatta.com> [2010-10-13 17:50:31 -0700]:

> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>


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

* Re: [PATCH net-next 2/2] stmmac: make function tables const
  2010-10-14  0:51 ` [PATCH net-next 2/2] stmmac: make function tables const Stephen Hemminger
@ 2010-10-13 21:35   ` Gustavo F. Padovan
  2010-10-16 18:57   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: Gustavo F. Padovan @ 2010-10-13 21:35 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, Giuseppe Cavallaro, Deepak SIKRI, netdev

* Stephen Hemminger <shemminger@vyatta.com> [2010-10-13 17:51:25 -0700]:

> These tables only contain function pointers.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>


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

* [PATCH net-next 1/2]: stmmac: make ethtool functions local
@ 2010-10-14  0:50 Stephen Hemminger
  2010-10-13 21:35 ` Gustavo F. Padovan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephen Hemminger @ 2010-10-14  0:50 UTC (permalink / raw)
  To: David Miller, Giuseppe Cavallaro, Deepak SIKRI; +Cc: netdev


Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/stmmac/stmmac_ethtool.c	2010-10-13 17:39:03.228159654 -0700
+++ b/drivers/net/stmmac/stmmac_ethtool.c	2010-10-13 17:41:07.317236754 -0700
@@ -89,8 +89,8 @@ static const struct  stmmac_stats stmmac
 };
 #define STMMAC_STATS_LEN ARRAY_SIZE(stmmac_gstrings_stats)
 
-void stmmac_ethtool_getdrvinfo(struct net_device *dev,
-			       struct ethtool_drvinfo *info)
+static void stmmac_ethtool_getdrvinfo(struct net_device *dev,
+				      struct ethtool_drvinfo *info)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 
@@ -104,7 +104,8 @@ void stmmac_ethtool_getdrvinfo(struct ne
 	info->n_stats = STMMAC_STATS_LEN;
 }
 
-int stmmac_ethtool_getsettings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int stmmac_ethtool_getsettings(struct net_device *dev,
+				      struct ethtool_cmd *cmd)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 	struct phy_device *phy = priv->phydev;
@@ -126,7 +127,8 @@ int stmmac_ethtool_getsettings(struct ne
 	return rc;
 }
 
-int stmmac_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int stmmac_ethtool_setsettings(struct net_device *dev,
+				      struct ethtool_cmd *cmd)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 	struct phy_device *phy = priv->phydev;
@@ -139,32 +141,32 @@ int stmmac_ethtool_setsettings(struct ne
 	return rc;
 }
 
-u32 stmmac_ethtool_getmsglevel(struct net_device *dev)
+static u32 stmmac_ethtool_getmsglevel(struct net_device *dev)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 	return priv->msg_enable;
 }
 
-void stmmac_ethtool_setmsglevel(struct net_device *dev, u32 level)
+static void stmmac_ethtool_setmsglevel(struct net_device *dev, u32 level)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 	priv->msg_enable = level;
 
 }
 
-int stmmac_check_if_running(struct net_device *dev)
+static int stmmac_check_if_running(struct net_device *dev)
 {
 	if (!netif_running(dev))
 		return -EBUSY;
 	return 0;
 }
 
-int stmmac_ethtool_get_regs_len(struct net_device *dev)
+static int stmmac_ethtool_get_regs_len(struct net_device *dev)
 {
 	return REG_SPACE_SIZE;
 }
 
-void stmmac_ethtool_gregs(struct net_device *dev,
+static void stmmac_ethtool_gregs(struct net_device *dev,
 			  struct ethtool_regs *regs, void *space)
 {
 	int i;
@@ -195,7 +197,7 @@ void stmmac_ethtool_gregs(struct net_dev
 	}
 }
 
-int stmmac_ethtool_set_tx_csum(struct net_device *netdev, u32 data)
+static int stmmac_ethtool_set_tx_csum(struct net_device *netdev, u32 data)
 {
 	if (data)
 		netdev->features |= NETIF_F_HW_CSUM;
@@ -205,7 +207,7 @@ int stmmac_ethtool_set_tx_csum(struct ne
 	return 0;
 }
 
-u32 stmmac_ethtool_get_rx_csum(struct net_device *dev)
+static u32 stmmac_ethtool_get_rx_csum(struct net_device *dev)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 

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

* [PATCH net-next 2/2] stmmac: make function tables const
  2010-10-14  0:50 [PATCH net-next 1/2]: stmmac: make ethtool functions local Stephen Hemminger
  2010-10-13 21:35 ` Gustavo F. Padovan
@ 2010-10-14  0:51 ` Stephen Hemminger
  2010-10-13 21:35   ` Gustavo F. Padovan
  2010-10-16 18:57   ` David Miller
  2010-10-16 18:57 ` [PATCH net-next 1/2]: stmmac: make ethtool functions local David Miller
  2 siblings, 2 replies; 6+ messages in thread
From: Stephen Hemminger @ 2010-10-14  0:51 UTC (permalink / raw)
  To: David Miller, Giuseppe Cavallaro, Deepak SIKRI; +Cc: netdev

These tables only contain function pointers.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


---
 drivers/net/stmmac/common.h         |    6 +++---
 drivers/net/stmmac/dwmac100.h       |    2 +-
 drivers/net/stmmac/dwmac1000.h      |    2 +-
 drivers/net/stmmac/dwmac1000_core.c |    2 +-
 drivers/net/stmmac/dwmac1000_dma.c  |    2 +-
 drivers/net/stmmac/dwmac100_core.c  |    2 +-
 drivers/net/stmmac/dwmac100_dma.c   |    2 +-
 drivers/net/stmmac/enh_desc.c       |    2 +-
 drivers/net/stmmac/norm_desc.c      |    2 +-
 drivers/net/stmmac/stmmac.h         |    4 ++--
 10 files changed, 13 insertions(+), 13 deletions(-)

--- a/drivers/net/stmmac/common.h	2010-10-13 17:42:30.599219840 -0700
+++ b/drivers/net/stmmac/common.h	2010-10-13 17:43:28.068306957 -0700
@@ -235,9 +235,9 @@ struct mii_regs {
 };
 
 struct mac_device_info {
-	struct stmmac_ops	*mac;
-	struct stmmac_desc_ops	*desc;
-	struct stmmac_dma_ops	*dma;
+	const struct stmmac_ops		*mac;
+	const struct stmmac_desc_ops	*desc;
+	const struct stmmac_dma_ops	*dma;
 	struct mii_regs mii;	/* MII register Addresses */
 	struct mac_link link;
 };
--- a/drivers/net/stmmac/dwmac1000_core.c	2010-10-13 17:42:30.615217915 -0700
+++ b/drivers/net/stmmac/dwmac1000_core.c	2010-10-13 17:43:05.115068037 -0700
@@ -212,7 +212,7 @@ static void dwmac1000_irq_status(void __
 	}
 }
 
-struct stmmac_ops dwmac1000_ops = {
+static const struct stmmac_ops dwmac1000_ops = {
 	.core_init = dwmac1000_core_init,
 	.rx_coe = dwmac1000_rx_coe_supported,
 	.dump_regs = dwmac1000_dump_regs,
--- a/drivers/net/stmmac/dwmac1000_dma.c	2010-10-13 17:44:34.880269557 -0700
+++ b/drivers/net/stmmac/dwmac1000_dma.c	2010-10-13 17:45:54.670669930 -0700
@@ -138,7 +138,7 @@ static void dwmac1000_dump_dma_regs(void
 	}
 }
 
-struct stmmac_dma_ops dwmac1000_dma_ops = {
+const struct stmmac_dma_ops dwmac1000_dma_ops = {
 	.init = dwmac1000_dma_init,
 	.dump_regs = dwmac1000_dump_dma_regs,
 	.dma_mode = dwmac1000_dma_operation_mode,
--- a/drivers/net/stmmac/dwmac100_core.c	2010-10-13 17:42:30.631215991 -0700
+++ b/drivers/net/stmmac/dwmac100_core.c	2010-10-13 17:42:45.377442238 -0700
@@ -168,7 +168,7 @@ static void dwmac100_pmt(void __iomem *i
 	return;
 }
 
-struct stmmac_ops dwmac100_ops = {
+static const struct stmmac_ops dwmac100_ops = {
 	.core_init = dwmac100_core_init,
 	.rx_coe = dwmac100_rx_coe_supported,
 	.dump_regs = dwmac100_dump_mac_regs,
--- a/drivers/net/stmmac/dwmac100_dma.c	2010-10-13 17:44:45.351009875 -0700
+++ b/drivers/net/stmmac/dwmac100_dma.c	2010-10-13 17:45:26.334079236 -0700
@@ -126,7 +126,7 @@ static void dwmac100_dma_diagnostic_fr(v
 	}
 }
 
-struct stmmac_dma_ops dwmac100_dma_ops = {
+const struct stmmac_dma_ops dwmac100_dma_ops = {
 	.init = dwmac100_dma_init,
 	.dump_regs = dwmac100_dump_dma_regs,
 	.dma_mode = dwmac100_dma_operation_mode,
--- a/drivers/net/stmmac/enh_desc.c	2010-10-13 17:43:40.150853494 -0700
+++ b/drivers/net/stmmac/enh_desc.c	2010-10-13 17:46:25.390973687 -0700
@@ -318,7 +318,7 @@ static int enh_desc_get_rx_frame_len(str
 	return p->des01.erx.frame_length;
 }
 
-struct stmmac_desc_ops enh_desc_ops = {
+const struct stmmac_desc_ops enh_desc_ops = {
 	.tx_status = enh_desc_get_tx_status,
 	.rx_status = enh_desc_get_rx_status,
 	.get_tx_len = enh_desc_get_tx_len,
--- a/drivers/net/stmmac/norm_desc.c	2010-10-13 17:44:05.363820440 -0700
+++ b/drivers/net/stmmac/norm_desc.c	2010-10-13 17:46:28.978542024 -0700
@@ -202,7 +202,7 @@ static int ndesc_get_rx_frame_len(struct
 	return p->des01.rx.frame_length;
 }
 
-struct stmmac_desc_ops ndesc_ops = {
+const struct stmmac_desc_ops ndesc_ops = {
 	.tx_status = ndesc_get_tx_status,
 	.rx_status = ndesc_get_rx_status,
 	.get_tx_len = ndesc_get_tx_len,
--- a/drivers/net/stmmac/dwmac100.h	2010-10-13 17:47:08.289811886 -0700
+++ b/drivers/net/stmmac/dwmac100.h	2010-10-13 17:47:14.477067381 -0700
@@ -118,4 +118,4 @@ enum ttc_control {
 #define DMA_MISSED_FRAME_OVE_M	0x00010000	/* Missed Frame Overflow */
 #define DMA_MISSED_FRAME_M_CNTR	0x0000ffff	/* Missed Frame Couinter */
 
-extern struct stmmac_dma_ops dwmac100_dma_ops;
+extern const struct stmmac_dma_ops dwmac100_dma_ops;
--- a/drivers/net/stmmac/dwmac1000.h	2010-10-13 17:46:53.607578558 -0700
+++ b/drivers/net/stmmac/dwmac1000.h	2010-10-13 17:46:59.630853799 -0700
@@ -205,4 +205,4 @@ enum rtc_control {
 #define GMAC_MMC_TX_INTR   0x108
 #define GMAC_MMC_RX_CSUM_OFFLOAD   0x208
 
-extern struct stmmac_dma_ops dwmac1000_dma_ops;
+extern const struct stmmac_dma_ops dwmac1000_dma_ops;
--- a/drivers/net/stmmac/stmmac.h	2010-10-13 17:47:30.415149545 -0700
+++ b/drivers/net/stmmac/stmmac.h	2010-10-13 17:47:40.497936258 -0700
@@ -121,5 +121,5 @@ static inline int stmmac_claim_resource(
 extern int stmmac_mdio_unregister(struct net_device *ndev);
 extern int stmmac_mdio_register(struct net_device *ndev);
 extern void stmmac_set_ethtool_ops(struct net_device *netdev);
-extern struct stmmac_desc_ops enh_desc_ops;
-extern struct stmmac_desc_ops ndesc_ops;
+extern const struct stmmac_desc_ops enh_desc_ops;
+extern const struct stmmac_desc_ops ndesc_ops;

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

* Re: [PATCH net-next 1/2]: stmmac: make ethtool functions local
  2010-10-14  0:50 [PATCH net-next 1/2]: stmmac: make ethtool functions local Stephen Hemminger
  2010-10-13 21:35 ` Gustavo F. Padovan
  2010-10-14  0:51 ` [PATCH net-next 2/2] stmmac: make function tables const Stephen Hemminger
@ 2010-10-16 18:57 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2010-10-16 18:57 UTC (permalink / raw)
  To: shemminger; +Cc: peppe.cavallaro, deepak.sikri, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 13 Oct 2010 17:50:31 -0700

> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH net-next 2/2] stmmac: make function tables const
  2010-10-14  0:51 ` [PATCH net-next 2/2] stmmac: make function tables const Stephen Hemminger
  2010-10-13 21:35   ` Gustavo F. Padovan
@ 2010-10-16 18:57   ` David Miller
  1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2010-10-16 18:57 UTC (permalink / raw)
  To: shemminger; +Cc: peppe.cavallaro, deepak.sikri, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 13 Oct 2010 17:51:25 -0700

> These tables only contain function pointers.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

end of thread, other threads:[~2010-10-16 18:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14  0:50 [PATCH net-next 1/2]: stmmac: make ethtool functions local Stephen Hemminger
2010-10-13 21:35 ` Gustavo F. Padovan
2010-10-14  0:51 ` [PATCH net-next 2/2] stmmac: make function tables const Stephen Hemminger
2010-10-13 21:35   ` Gustavo F. Padovan
2010-10-16 18:57   ` David Miller
2010-10-16 18:57 ` [PATCH net-next 1/2]: stmmac: make ethtool functions local David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).