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

net: inet_diag_handler structs can be const

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
a7a0d6a8 14e943db

+2 -2
+1 -1
net/dccp/diag.c
··· 45 45 dccp_get_info(sk, _info); 46 46 } 47 47 48 - static struct inet_diag_handler dccp_diag_handler = { 48 + static const struct inet_diag_handler dccp_diag_handler = { 49 49 .idiag_hashinfo = &dccp_hashinfo, 50 50 .idiag_get_info = dccp_diag_get_info, 51 51 .idiag_type = DCCPDIAG_GETSOCK,
+1 -1
net/ipv4/tcp_diag.c
··· 34 34 tcp_get_info(sk, info); 35 35 } 36 36 37 - static struct inet_diag_handler tcp_diag_handler = { 37 + static const struct inet_diag_handler tcp_diag_handler = { 38 38 .idiag_hashinfo = &tcp_hashinfo, 39 39 .idiag_get_info = tcp_diag_get_info, 40 40 .idiag_type = TCPDIAG_GETSOCK,