Skip to contentSkip to conversation

net: atm: make atmdev_ops const

PATCH Applied Bhumika Goyal 2 participants 2 messages Aug 9, 2017 – Aug 10, 2017

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

PATCH 1/1 net: atm: make atmdev_ops const

Make these const as they are only stored in the ops field of a atm_dev structure, which is const.
Done using Coccinelle.

---
 net/atm/clip.c      | 2 +-
 net/atm/lec.c       | 2 +-
 net/atm/mpc.c       | 2 +-
 net/atm/signaling.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
net/atm/clip.c +1 -1
index f271a7b..65f706e 100644
@@ -617,7 +617,7 @@ static void atmarpd_close(struct atm_vcc *vcc)
 	module_put(THIS_MODULE);
 }
 
-static struct atmdev_ops atmarpd_dev_ops = {
+static const struct atmdev_ops atmarpd_dev_ops = {
 	.close = atmarpd_close
 };
 
net/atm/lec.c +1 -1
index 093fe87..a3d93a1 100644
@@ -486,7 +486,7 @@ static void lec_atm_close(struct atm_vcc *vcc)
 	module_put(THIS_MODULE);
 }
 
-static struct atmdev_ops lecdev_ops = {
+static const struct atmdev_ops lecdev_ops = {
 	.close = lec_atm_close,
 	.send = lec_atm_send
 };
net/atm/mpc.c +1 -1
index 680a4b9..5677147 100644
@@ -779,7 +779,7 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
 	netif_rx(new_skb);
 }
 
-static struct atmdev_ops mpc_ops = { /* only send is required */
+static const struct atmdev_ops mpc_ops = { /* only send is required */
 	.close	= mpoad_close,
 	.send	= msg_from_mpoad
 };
net/atm/signaling.c +1 -1
index 983c3a2..0a20f6e 100644
@@ -217,7 +217,7 @@ static void sigd_close(struct atm_vcc *vcc)
 	read_unlock(&vcc_sklist_lock);
 }
 
-static struct atmdev_ops sigd_dev_ops = {
+static const struct atmdev_ops sigd_dev_ops = {
 	.close = sigd_close,
 	.send =	sigd_send
 };
Signature · 1 line
1.9.1