Skip to contentSkip to conversation

constify ethtool_ops structures

PATCH In review Julia Lawall 6 participants 17 messages Aug 31, 2016 – Sep 1, 2016

Subsystems (10)
lore
Share & tools
lore
#0 lore raw

cover constify ethtool_ops structures

Constify ethtool_ops structures.

---

 drivers/net/ethernet/agere/et131x.c              |    2 +-
 drivers/net/ethernet/broadcom/bcmsysport.c       |    2 +-
 drivers/net/ethernet/broadcom/genet/bcmgenet.c   |    2 +-
 drivers/net/ethernet/hisilicon/hip04_eth.c       |    2 +-
 drivers/net/ethernet/hisilicon/hisi_femac.c      |    2 +-
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c    |    2 +-
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c |    2 +-
 drivers/net/ethernet/synopsys/dwc_eth_qos.c      |    2 +-
 drivers/staging/slicoss/slicoss.c                |    4 ++--
 9 files changed, 10 insertions(+), 10 deletions(-)
#1 lore raw

PATCH 1/6 staging: slicoss: constify ethtool_ops structures

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

---
 drivers/staging/slicoss/slicoss.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/slicoss/slicoss.c +2 -2
index 7834bda..21280a3 100644
@@ -124,7 +124,7 @@ static const struct pci_device_id slic_pci_tbl[] = {
 	{ 0 }
 };
 
-static struct ethtool_ops slic_ethtool_ops;
+static const struct ethtool_ops slic_ethtool_ops;
 
 MODULE_DEVICE_TABLE(pci, slic_pci_tbl);
 
@@ -3128,7 +3128,7 @@ static void __exit slic_module_cleanup(void)
 	pci_unregister_driver(&slic_driver);
 }
 
-static struct ethtool_ops slic_ethtool_ops = {
+static const struct ethtool_ops slic_ethtool_ops = {
 	.get_coalesce = slic_get_coalesce,
 	.set_coalesce = slic_set_coalesce
 };
#2 lore raw

PATCH 2/6 net: ethernet: et131x: constify ethtool_ops structures

In reply to Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

---
 drivers/net/ethernet/agere/et131x.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/agere/et131x.c +1 -1
index c83ebae..9066838 100644
@@ -2961,7 +2961,7 @@ static void et131x_get_drvinfo(struct net_device *netdev,
 		sizeof(info->bus_info));
 }
 
-static struct ethtool_ops et131x_ethtool_ops = {
+static const struct ethtool_ops et131x_ethtool_ops = {
 	.get_drvinfo	= et131x_get_drvinfo,
 	.get_regs_len	= et131x_get_regs_len,
 	.get_regs	= et131x_get_regs,
Acked-by on v1 2/6
#3 lore raw

Re: [PATCH 2/6] net: ethernet: et131x: constify ethtool_ops structures

Quoted 44 lines · Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

Quoted 1 line

Looks good, thanks.

#4 lore raw

PATCH 3/6 net: bcmgenet: constify ethtool_ops structures

In reply to Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/genet/bcmgenet.c +1 -1
index 8d4f849..46f9043 100644
@@ -973,7 +973,7 @@ static int bcmgenet_nway_reset(struct net_device *dev)
 }
 
 /* standard ethtool support functions. */
-static struct ethtool_ops bcmgenet_ethtool_ops = {
+static const struct ethtool_ops bcmgenet_ethtool_ops = {
 	.get_strings		= bcmgenet_get_strings,
 	.get_sset_count		= bcmgenet_get_sset_count,
 	.get_ethtool_stats	= bcmgenet_get_ethtool_stats,
Acked-by on v1 3/6
#5 lore raw

Re: [PATCH 3/6] net: bcmgenet: constify ethtool_ops structures

Quoted 44 lines · Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

Quoted 1 line
Signature · 1 line
Florian
#6 lore raw

PATCH 4/6 net: hisilicon: constify ethtool_ops structures

In reply to Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

---
 drivers/net/ethernet/hisilicon/hip04_eth.c       |    2 +-
 drivers/net/ethernet/hisilicon/hisi_femac.c      |    2 +-
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c    |    2 +-
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ethernet/hisilicon/hip04_eth.c +1 -1
index 0c4afe9..a90ab40 100644
@@ -755,7 +755,7 @@ static void hip04_get_drvinfo(struct net_device *netdev,
 	strlcpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version));
 }
 
-static struct ethtool_ops hip04_ethtool_ops = {
+static const struct ethtool_ops hip04_ethtool_ops = {
 	.get_coalesce		= hip04_get_coalesce,
 	.set_coalesce		= hip04_set_coalesce,
 	.get_drvinfo		= hip04_get_drvinfo,
drivers/net/ethernet/hisilicon/hisi_femac.c +1 -1
index b5d7ad0..ca68e22 100644
@@ -699,7 +699,7 @@ static int hisi_femac_net_ioctl(struct net_device *dev,
 	return phy_mii_ioctl(dev->phydev, ifreq, cmd);
 }
 
-static struct ethtool_ops hisi_femac_ethtools_ops = {
+static const struct ethtool_ops hisi_femac_ethtools_ops = {
 	.get_link		= ethtool_op_get_link,
 	.get_link_ksettings	= phy_ethtool_get_link_ksettings,
 	.set_link_ksettings	= phy_ethtool_set_link_ksettings,
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +1 -1
index 275618b..e69a6be 100644
@@ -750,7 +750,7 @@ static const struct net_device_ops hix5hd2_netdev_ops = {
 	.ndo_set_mac_address	= hix5hd2_net_set_mac_address,
 };
 
-static struct ethtool_ops hix5hd2_ethtools_ops = {
+static const struct ethtool_ops hix5hd2_ethtools_ops = {
 	.get_link		= ethtool_op_get_link,
 	.get_link_ksettings     = phy_ethtool_get_link_ksettings,
 	.set_link_ksettings     = phy_ethtool_set_link_ksettings,
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +1 -1
index ab33487..5eb3245 100644
@@ -1264,7 +1264,7 @@ static int hns_get_rxnfc(struct net_device *netdev,
 	return 0;
 }
 
-static struct ethtool_ops hns_ethtool_ops = {
+static const struct ethtool_ops hns_ethtool_ops = {
 	.get_drvinfo = hns_nic_get_drvinfo,
 	.get_link  = hns_nic_get_link,
 	.get_settings  = hns_nic_get_settings,
#7 lore raw

PATCH 5/6 dwc_eth_qos: constify ethtool_ops structures

In reply to Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

---
 drivers/net/ethernet/synopsys/dwc_eth_qos.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/synopsys/dwc_eth_qos.c +1 -1
index 5a3941b..c25d971 100644
@@ -2743,7 +2743,7 @@ static void dwceqos_set_msglevel(struct net_device *ndev, u32 msglevel)
 	lp->msg_enable = msglevel;
 }
 
-static struct ethtool_ops dwceqos_ethtool_ops = {
+static const struct ethtool_ops dwceqos_ethtool_ops = {
 	.get_drvinfo    = dwceqos_get_drvinfo,
 	.get_link       = ethtool_op_get_link,
 	.get_pauseparam = dwceqos_get_pauseparam,
#8 lore raw

PATCH 6/6 net: systemport: constify ethtool_ops structures

In reply to Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

---
 drivers/net/ethernet/broadcom/bcmsysport.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/broadcom/bcmsysport.c +1 -1
index b2d3086..dbbe8a5 100644
@@ -1692,7 +1692,7 @@ static int bcm_sysport_stop(struct net_device *dev)
 	return 0;
 }
 
-static struct ethtool_ops bcm_sysport_ethtool_ops = {
+static const struct ethtool_ops bcm_sysport_ethtool_ops = {
 	.get_drvinfo		= bcm_sysport_get_drvinfo,
 	.get_msglevel		= bcm_sysport_get_msglvl,
 	.set_msglevel		= bcm_sysport_set_msglvl,
Acked-by on v1 6/6
#9 lore raw

Re: [PATCH 6/6] net: systemport: constify ethtool_ops structures

Quoted 44 lines · Julia Lawall

Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct ethtool_ops i@p = { ... };

@ok1@
identifier r.i;
struct net_device e;
position p;
@@
e.ethtool_ops = &i@p;

@ok2@
identifier r.i;
expression e;
position p;
@@
netdev_set_default_ethtool_ops(e, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ethtool_ops i = { ... };
// </smpl>

Quoted 1 line
Signature · 1 line
Florian
#10 lore raw
In reply to Julia Lawall
Quoted 14 lines · On Wed, 31 Aug 2016 09:30:42 +0200 Julia Lawall <[email protected]> wrote:

Constify ethtool_ops structures.

---

 drivers/net/ethernet/agere/et131x.c              |    2 +-
 drivers/net/ethernet/broadcom/bcmsysport.c       |    2 +-
 drivers/net/ethernet/broadcom/genet/bcmgenet.c   |    2 +-
 drivers/net/ethernet/hisilicon/hip04_eth.c       |    2 +-
 drivers/net/ethernet/hisilicon/hisi_femac.c      |    2 +-
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c    |    2 +-
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c |    2 +-
 drivers/net/ethernet/synopsys/dwc_eth_qos.c      |    2 +-
 drivers/staging/slicoss/slicoss.c                |    4 ++--
 9 files changed, 10 insertions(+), 10 deletions(-)
Quoted 4 lines

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Other drivers with same type of issue

drivers/net/ethernet/mediatek/mtk_eth_soc.c:static struct ethtool_ops mtk_ethtool_ops = { drivers/net/ethernet/synopsys/dwc_eth_qos.c:static struct ethtool_ops dwceqos_ethtool_ops = { drivers/net/ethernet/xilinx/xilinx_axienet_main.c:static struct ethtool_ops axienet_ethtool_ops = { drivers/net/usb/r8152.c:static struct ethtool_ops ops = { drivers/staging/netlogic/xlr_net.c:static struct ethtool_ops xlr_ethtool_ops = {

#11 lore raw
Quoted 22 lines · Stephen Hemminger
Quoted 14 lines · On Wed, 31 Aug 2016 09:30:42 +0200 Julia Lawall <[email protected]> wrote:

Constify ethtool_ops structures.

---

 drivers/net/ethernet/agere/et131x.c              |    2 +-
 drivers/net/ethernet/broadcom/bcmsysport.c       |    2 +-
 drivers/net/ethernet/broadcom/genet/bcmgenet.c   |    2 +-
 drivers/net/ethernet/hisilicon/hip04_eth.c       |    2 +-
 drivers/net/ethernet/hisilicon/hisi_femac.c      |    2 +-
 drivers/net/ethernet/hisilicon/hix5hd2_gmac.c    |    2 +-
 drivers/net/ethernet/hisilicon/hns/hns_ethtool.c |    2 +-
 drivers/net/ethernet/synopsys/dwc_eth_qos.c      |    2 +-
 drivers/staging/slicoss/slicoss.c                |    4 ++--
 9 files changed, 10 insertions(+), 10 deletions(-)
Quoted 4 lines

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Quoted 8 lines

Other drivers with same type of issue

drivers/net/ethernet/mediatek/mtk_eth_soc.c:static struct ethtool_ops mtk_ethtool_ops = { drivers/net/ethernet/synopsys/dwc_eth_qos.c:static struct ethtool_ops dwceqos_ethtool_ops = { drivers/net/ethernet/xilinx/xilinx_axienet_main.c:static struct ethtool_ops axienet_ethtool_ops = { drivers/net/usb/r8152.c:static struct ethtool_ops ops = { drivers/staging/netlogic/xlr_net.c:static struct ethtool_ops xlr_ethtool_ops = {

Thanks. Probably they don't compile for x86, or at least not with make allyesconfig. I can check on them.

julia

#12 lore raw

RFC 1/1 xgbe: constify get_netdev_ops and get_ethtool_ops

In reply to Julia Lawall

Casting away const is bad practice. Since this is ARM specific driver don't have hardware actually test this.

Having getter functions for ops is really unnecessary code bloat, but not going to touch that.

---
 drivers/net/ethernet/amd/xgbe/xgbe-drv.c     | 4 ++--
 drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c | 4 ++--
 drivers/net/ethernet/amd/xgbe/xgbe.h         | 5 +++--
 3 files changed, 7 insertions(+), 6 deletions(-)
drivers/net/ethernet/amd/xgbe/xgbe-drv.c +2 -2
index a9b2709..7f9216d 100644
@@ -1708,9 +1708,9 @@ static const struct net_device_ops xgbe_netdev_ops = {
 	.ndo_set_features	= xgbe_set_features,
 };
 
-struct net_device_ops *xgbe_get_netdev_ops(void)
+const struct net_device_ops *xgbe_get_netdev_ops(void)
 {
-	return (struct net_device_ops *)&xgbe_netdev_ops;
+	return &xgbe_netdev_ops;
 }
 
 static void xgbe_rx_refresh(struct xgbe_channel *channel)
drivers/net/ethernet/amd/xgbe/xgbe-ethtool.c +2 -2
index 11d9f0c..4007b42 100644
@@ -623,7 +623,7 @@ static const struct ethtool_ops xgbe_ethtool_ops = {
 	.get_ts_info = xgbe_get_ts_info,
 };
 
-struct ethtool_ops *xgbe_get_ethtool_ops(void)
+const struct ethtool_ops *xgbe_get_ethtool_ops(void)
 {
-	return (struct ethtool_ops *)&xgbe_ethtool_ops;
+	return &xgbe_ethtool_ops;
 }
drivers/net/ethernet/amd/xgbe/xgbe.h +3 -2
index 98d9d63..5dd17dc 100644
@@ -956,8 +956,9 @@ struct xgbe_prv_data {
 void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *);
 void xgbe_init_function_ptrs_phy(struct xgbe_phy_if *);
 void xgbe_init_function_ptrs_desc(struct xgbe_desc_if *);
-struct net_device_ops *xgbe_get_netdev_ops(void);
-struct ethtool_ops *xgbe_get_ethtool_ops(void);
+const struct net_device_ops *xgbe_get_netdev_ops(void);
+const struct ethtool_ops *xgbe_get_ethtool_ops(void);
+
 #ifdef CONFIG_AMD_XGBE_DCB
 const struct dcbnl_rtnl_ops *xgbe_get_dcbnl_ops(void);
 #endif
Signature · 1 line
2.9.3
maintainer
#13 lore raw

Re: [RFC] xgbe: constify get_netdev_ops and get_ethtool_ops

From: Stephen Hemminger <[email protected]>
Date: Wed, 31 Aug 2016 08:57:36 -0700

Quoted 7 lines

Casting away const is bad practice. Since this is ARM specific driver don't have hardware actually test this.

Having getter functions for ops is really unnecessary code bloat, but not going to touch that.

I'll just apply this, let's see what happens.

#14 lore raw

Re: [RFC] xgbe: constify get_netdev_ops and get_ethtool_ops

Quoted 6 lines · David Miller

From: Stephen Hemminger <[email protected]>
Date: Wed, 31 Aug 2016 08:57:36 -0700

Quoted 3 lines

Casting away const is bad practice. Since this is ARM specific driver don't have hardware actually test this.

Quoted 6 lines
Quoted 4 lines

Having getter functions for ops is really unnecessary code bloat, but not going to touch that.

I'll just apply this, let's see what happens.

I should be able to test this in the next few days. I don't expect there to be an issue. I'll let you know what I find.

Thanks,
Tom

Quoted 1 line
Tested-by
#15 lore raw

Re: [RFC] xgbe: constify get_netdev_ops and get_ethtool_ops

Quoted 10 lines · Tom Lendacky
Quoted 9 lines · David Miller

From: Stephen Hemminger <[email protected]>
Date: Wed, 31 Aug 2016 08:57:36 -0700

Quoted 6 lines

Casting away const is bad practice. Since this is ARM specific driver don't have hardware actually test this.

Having getter functions for ops is really unnecessary code bloat, but not going to touch that.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

I'll just apply this, let's see what happens.

I should be able to test this in the next few days. I don't expect there to be an issue. I'll let you know what I find.

No issues found in build and test. For what it's worth since the patch is already applied:

Quoted 5 lines

Thanks,
Tom

Quoted 1 line