Commit 0a2db463 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

raw: preserve const qualifier in raw_sk()

We can change raw_sk() to propagate const qualifier of its argument,
thanks to container_of_const()
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 68ac9a8b
......@@ -83,10 +83,7 @@ struct raw_sock {
u32 ipmr_table;
};
static inline struct raw_sock *raw_sk(const struct sock *sk)
{
return (struct raw_sock *)sk;
}
#define raw_sk(ptr) container_of_const(ptr, struct raw_sock, inet.sk)
static inline bool raw_sk_bound_dev_eq(struct net *net, int bound_dev_if,
int dif, int sdif)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment