Skip to contentSkip to conversation

net : make ip_tos2prio const

PATCH Applied Philippe De Muyter 2 participants 2 messages Jul 6, 2007 – Jul 10, 2007

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

PATCH 1/1 net : make ip_tos2prio const

Hi all,

Make ip_tos2prio `const'.

include/net/route.h +1 -1
diff -r 6c0a10cc415a include/net/route.h
@@ -136,7 +136,7 @@ static inline void ip_rt_put(struct rtab
 
 #define IPTOS_RT_MASK	(IPTOS_TOS_MASK & ~3)
 
-extern __u8 ip_tos2prio[16];
+extern const __u8 ip_tos2prio[16];
 
 static inline char rt_tos2priority(u8 tos)
 {
net/ipv4/route.c +1 -1
diff -r 6c0a10cc415a net/ipv4/route.c
@@ -168,7 +168,7 @@ static struct dst_ops ipv4_dst_ops = {
 
 #define ECN_OR_COST(class)	TC_PRIO_##class
 
-__u8 ip_tos2prio[16] = {
+const __u8 ip_tos2prio[16] = {
 	TC_PRIO_BESTEFFORT,
 	ECN_OR_COST(FILLER),
 	TC_PRIO_BESTEFFORT,