]> www.infradead.org Git - users/hch/misc.git/commitdiff
psp: make struct sock argument const in psp_sk_get_assoc_rcu()
authorDaniel Zahka <daniel.zahka@gmail.com>
Thu, 18 Sep 2025 15:52:02 +0000 (08:52 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 20 Sep 2025 00:01:20 +0000 (17:01 -0700)
This function does not need a mutable reference to its argument.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20250918155205.2197603-2-daniel.zahka@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/psp/functions.h

index 91ba067333219e37ee744b98f3c301a7d0ebd9c9..fb3cbe8427ea502eddc9569bf3a7f17d637e2d32 100644 (file)
@@ -124,7 +124,7 @@ psp_twsk_rx_policy_check(struct inet_timewait_sock *tw, struct sk_buff *skb)
        return __psp_sk_rx_policy_check(skb, rcu_dereference(tw->psp_assoc));
 }
 
-static inline struct psp_assoc *psp_sk_get_assoc_rcu(struct sock *sk)
+static inline struct psp_assoc *psp_sk_get_assoc_rcu(const struct sock *sk)
 {
        struct inet_timewait_sock *tw;
        struct psp_assoc *pas;