Skip to contentSkip to conversation

net: dsa: Constify two tagger ops

PATCH In review Florian Fainelli 2 participants 4 messages May 11, 2020

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

cover net: dsa: Constify two tagger ops

This patch series constifies the dsa_device_ops for ocelot and sja1105

Florian Fainelli (2):
net: dsa: ocelot: Constify dsa_device_ops
net: dsa: tag_sja1105: Constify dsa_device_ops

 net/dsa/tag_ocelot.c  | 2 +-
 net/dsa/tag_sja1105.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/2 net: dsa: ocelot: Constify dsa_device_ops

ocelot_netdev_ops should be const since that is what the DSA layer expects.

---
 net/dsa/tag_ocelot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/tag_ocelot.c +1 -1
index 59de1315100f..b0c98ee4e13b 100644
@@ -228,7 +228,7 @@ static struct sk_buff *ocelot_rcv(struct sk_buff *skb,
 	return skb;
 }
 
-static struct dsa_device_ops ocelot_netdev_ops = {
+static const struct dsa_device_ops ocelot_netdev_ops = {
 	.name			= "ocelot",
 	.proto			= DSA_TAG_PROTO_OCELOT,
 	.xmit			= ocelot_xmit,
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/2 net: dsa: tag_sja1105: Constify dsa_device_ops

In reply to Florian Fainelli

sja1105_netdev_ops should be const since that is what the DSA layer expects.

---
 net/dsa/tag_sja1105.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/tag_sja1105.c +1 -1
index d553bf36bd41..5ecac5921a7d 100644
@@ -304,7 +304,7 @@ static struct sk_buff *sja1105_rcv(struct sk_buff *skb,
 					      is_meta);
 }
 
-static struct dsa_device_ops sja1105_netdev_ops = {
+static const struct dsa_device_ops sja1105_netdev_ops = {
 	.name = "sja1105",
 	.proto = DSA_TAG_PROTO_SJA1105,
 	.xmit = sja1105_xmit,
Signature · 1 line
2.17.1