From 2fa3888bb7a9fb3966c77555c8cd6f4bd6a1439a Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 11 May 2020 16:47:14 -0700 Subject: [PATCH 1/2] net: dsa: ocelot: Constify dsa_device_ops ocelot_netdev_ops should be const since that is what the DSA layer expects. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- net/dsa/tag_ocelot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_ocelot.c b/net/dsa/tag_ocelot.c index 59de1315100f..b0c98ee4e13b 100644 --- a/net/dsa/tag_ocelot.c +++ b/net/dsa/tag_ocelot.c @@ -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, From 097f024454fca0e13bbba0ab54dfe63ac5610953 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Mon, 11 May 2020 16:47:15 -0700 Subject: [PATCH 2/2] net: dsa: tag_sja1105: Constify dsa_device_ops sja1105_netdev_ops should be const since that is what the DSA layer expects. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- net/dsa/tag_sja1105.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c index d553bf36bd41..5ecac5921a7d 100644 --- a/net/dsa/tag_sja1105.c +++ b/net/dsa/tag_sja1105.c @@ -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,