Commit 89c04d6c authored by Wu Yunchuan's avatar Wu Yunchuan Committed by Jakub Kicinski

net: ppp: Remove unnecessary (void*) conversions

No need cast (void*) to (struct sock *).
Signed-off-by: default avatarWu Yunchuan <yunchuan@nfschina.com>
Reviewed-by: default avatarGuillaume Nault <gnault@redhat.com>
Link: https://lore.kernel.org/r/20230717031115.54432-1-yunchuan@nfschina.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f15fbe46
......@@ -968,7 +968,7 @@ static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
***********************************************************************/
static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb)
{
struct sock *sk = (struct sock *)chan->private;
struct sock *sk = chan->private;
return __pppoe_xmit(sk, skb);
}
......@@ -976,7 +976,7 @@ static int pppoe_fill_forward_path(struct net_device_path_ctx *ctx,
struct net_device_path *path,
const struct ppp_channel *chan)
{
struct sock *sk = (struct sock *)chan->private;
struct sock *sk = chan->private;
struct pppox_sock *po = pppox_sk(sk);
struct net_device *dev = po->pppoe_dev;
......
......@@ -148,7 +148,7 @@ static struct rtable *pptp_route_output(const struct pppox_sock *po,
static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
{
struct sock *sk = (struct sock *) chan->private;
struct sock *sk = chan->private;
struct pppox_sock *po = pppox_sk(sk);
struct net *net = sock_net(sk);
struct pptp_opt *opt = &po->proto.pptp;
......@@ -575,7 +575,7 @@ static int pptp_create(struct net *net, struct socket *sock, int kern)
static int pptp_ppp_ioctl(struct ppp_channel *chan, unsigned int cmd,
unsigned long arg)
{
struct sock *sk = (struct sock *) chan->private;
struct sock *sk = chan->private;
struct pppox_sock *po = pppox_sk(sk);
struct pptp_opt *opt = &po->proto.pptp;
void __user *argp = (void __user *)arg;
......
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