Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NET]: Constify include/net/dsfield.h

Constify include/net/dsfield.h

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jan Engelhardt and committed by
David S. Miller
3c3f4866 4c37799c

+3 -3
+3 -3
include/net/dsfield.h
··· 12 12 #include <asm/byteorder.h> 13 13 14 14 15 - static inline __u8 ipv4_get_dsfield(struct iphdr *iph) 15 + static inline __u8 ipv4_get_dsfield(const struct iphdr *iph) 16 16 { 17 17 return iph->tos; 18 18 } 19 19 20 20 21 - static inline __u8 ipv6_get_dsfield(struct ipv6hdr *ipv6h) 21 + static inline __u8 ipv6_get_dsfield(const struct ipv6hdr *ipv6h) 22 22 { 23 - return ntohs(*(__be16 *) ipv6h) >> 4; 23 + return ntohs(*(const __be16 *)ipv6h) >> 4; 24 24 } 25 25 26 26