udp: preserve const qualifier in udp_sk()
authorEric Dumazet <edumazet@google.com>
Fri, 17 Mar 2023 15:55:30 +0000 (15:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 18 Mar 2023 12:23:33 +0000 (12:23 +0000)
commit94c540fbfc80ef95ec398fc77da1920de2946edb
tree67b2d9b2150997513e35d9943517dd294b8c8c2f
parent39a86d059a78bf29b66dd8bbeab04af1d55c02ba
udp: preserve const qualifier in udp_sk()

We can change udp_sk() to propagate const qualifier of its argument,
thanks to container_of_const()

This should avoid some potential errors caused by accidental
(const -> not_const) promotion.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willem de Bruijn <willemb@google.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/udp.h