Skip to contentSkip to conversation

net: phonet: mark header_ops as const

PATCH Applied Lin Zhang 2 participants 2 messages Oct 5, 2017 – Oct 7, 2017

Subsystems (3)
lore
Share & tools
lore

Lin Zhang

author
#0 lore raw

PATCH v3 1/2 net: phonet: mark header_ops as const

---
changelog:

v2 -> v3:
* fix phonet_header_ops type mismatch error

---
 include/linux/if_phonet.h | 2 +-
 net/phonet/af_phonet.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/linux/if_phonet.h +1 -1
index bbcdb0a..a118ee4 100644
@@ -10,5 +10,5 @@
 
 #include <uapi/linux/if_phonet.h>
 
-extern struct header_ops phonet_header_ops;
+extern const struct header_ops phonet_header_ops;
 #endif
net/phonet/af_phonet.c +1 -1
index f925753..b12142e 100644
@@ -149,7 +149,7 @@ static int pn_header_parse(const struct sk_buff *skb, unsigned char *haddr)
 	return 1;
 }
 
-struct header_ops phonet_header_ops = {
+const struct header_ops phonet_header_ops = {
 	.create = pn_header_create,
 	.parse = pn_header_parse,
 };
Signature · 1 line
1.8.3.1