pptp: Constify the po parameter of pptp_route_output().
authorGuillaume Nault <gnault@redhat.com>
Tue, 11 Jul 2023 13:06:26 +0000 (15:06 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Jul 2023 07:27:33 +0000 (08:27 +0100)
Make it explicit that this function doesn't modify the socket passed as
parameter.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/pptp.c

index 32183f2..57d38b2 100644 (file)
@@ -129,10 +129,10 @@ static void del_chan(struct pppox_sock *sock)
        spin_unlock(&chan_lock);
 }
 
-static struct rtable *pptp_route_output(struct pppox_sock *po,
+static struct rtable *pptp_route_output(const struct pppox_sock *po,
                                        struct flowi4 *fl4)
 {
-       struct sock *sk = &po->sk;
+       const struct sock *sk = &po->sk;
        struct net *net;
 
        net = sock_net(sk);