mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
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: Eric Dumazet <edumazet@google.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
68ac9a8b6e
commit
0a2db4630b
1 changed files with 1 additions and 4 deletions
|
@ -83,10 +83,7 @@ struct raw_sock {
|
||||||
u32 ipmr_table;
|
u32 ipmr_table;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline struct raw_sock *raw_sk(const struct sock *sk)
|
#define raw_sk(ptr) container_of_const(ptr, struct raw_sock, inet.sk)
|
||||||
{
|
|
||||||
return (struct raw_sock *)sk;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool raw_sk_bound_dev_eq(struct net *net, int bound_dev_if,
|
static inline bool raw_sk_bound_dev_eq(struct net *net, int bound_dev_if,
|
||||||
int dif, int sdif)
|
int dif, int sdif)
|
||||||
|
|
Loading…
Reference in a new issue