Skip to content

Commit

Permalink
net: packet: make pkt_sk() inline
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Menglong Dong authored and kuba-moo committed Jan 30, 2021
1 parent 0ba35fe commit 8c22475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/packet/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8c22475

Please sign in to comment.