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

x25: preserve const qualifier in [a]x25_sk()

We can change [a]x25_sk() to propagate their argument const qualifier,
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 407db475
......@@ -260,10 +260,7 @@ struct ax25_sock {
struct ax25_cb *cb;
};
static inline struct ax25_sock *ax25_sk(const struct sock *sk)
{
return (struct ax25_sock *) sk;
}
#define ax25_sk(ptr) container_of_const(ptr, struct ax25_sock, sk)
static inline struct ax25_cb *sk_to_ax25(const struct sock *sk)
{
......
......@@ -177,10 +177,7 @@ struct x25_forward {
atomic_t refcnt;
};
static inline struct x25_sock *x25_sk(const struct sock *sk)
{
return (struct x25_sock *)sk;
}
#define x25_sk(ptr) container_of_const(ptr, struct x25_sock, sk)
/* af_x25.c */
extern int sysctl_x25_restart_request_timeout;
......
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