diff options
author | Menglong Dong <dong.menglong@zte.com.cn> | 2021-01-27 04:33:02 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-29 17:38:55 -0800 |
commit | 8c22475148a8d3222be712bd02a74d7279d50daf (patch) | |
tree | d990b25f922844a653c7489fca43b78c0cbfd505 /net/packet | |
parent | 0ba35fe91ce34f2d0feff626efd0062dac41781c (diff) | |
download | linux-8c22475148a8d3222be712bd02a74d7279d50daf.tar.gz linux-8c22475148a8d3222be712bd02a74d7279d50daf.tar.bz2 linux-8c22475148a8d3222be712bd02a74d7279d50daf.zip |
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.h | 2 |
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; } |