OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0ba35fe
)
net: packet: make pkt_sk() inline
author
Menglong Dong
<dong.menglong@zte.com.cn>
Wed, 27 Jan 2021 12:33:02 +0000
(
04:33
-0800)
committer
Jakub Kicinski
<kuba@kernel.org>
Sat, 30 Jan 2021 01:38:55 +0000
(17:38 -0800)
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>
net/packet/internal.h
patch
|
blob
|
history
diff --git
a/net/packet/internal.h
b/net/packet/internal.h
index
baafc3f
..
5f61e59
100644
(file)
--- 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;
}