summaryrefslogtreecommitdiff
path: root/net/packet
diff options
context:
space:
mode:
authorMenglong Dong <dong.menglong@zte.com.cn>2021-01-27 04:33:02 -0800
committerJakub Kicinski <kuba@kernel.org>2021-01-29 17:38:55 -0800
commit8c22475148a8d3222be712bd02a74d7279d50daf (patch)
treed990b25f922844a653c7489fca43b78c0cbfd505 /net/packet
parent0ba35fe91ce34f2d0feff626efd0062dac41781c (diff)
net: packet: make pkt_sk() inline
It's better make 'pkt_sk()' inline here, as non-inline function shouldn't occur in headers. Besides, this function is simple enough to be inline. Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn> Link: https://lore.kernel.org/r/20210127123302.29842-1-dong.menglong@zte.com.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/internal.h b/net/packet/internal.h
index baafc3f3fa25..5f61e59ebbff 100644
--- a/net/packet/internal.h
+++ b/net/packet/internal.h
@@ -139,7 +139,7 @@ struct packet_sock {
atomic_t tp_drops ____cacheline_aligned_in_smp;
};
-static struct packet_sock *pkt_sk(struct sock *sk)
+static inline struct packet_sock *pkt_sk(struct sock *sk)
{
return (struct packet_sock *)sk;
}