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

netlink: Undo const marker in netlink_is_kernel().

We can't do this without propagating the const to nlk_sk()
too, otherwise:

net/netlink/af_netlink.c: In function ‘netlink_is_kernel’:
net/netlink/af_netlink.c:103:2: warning: passing argument 1 of ‘nlk_sk’ discards ‘const’ qualifier from pointer target type [enabled by default]
net/netlink/af_netlink.c:96:36: note: expected ‘struct sock *’ but argument is of type ‘const struct sock *’

Signed-off-by: David S. Miller <davem@davemloft.net>

+1 -1
+1 -1
net/netlink/af_netlink.c
··· 98 98 return container_of(sk, struct netlink_sock, sk); 99 99 } 100 100 101 - static inline int netlink_is_kernel(const struct sock *sk) 101 + static inline int netlink_is_kernel(struct sock *sk) 102 102 { 103 103 return nlk_sk(sk)->flags & NETLINK_KERNEL_SOCKET; 104 104 }