Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net-next v2] net/packet: Remove unused macro BLOCK_PRIV
@ 2020-09-05 8:50 Wang Hai
2020-09-05 9:15 ` Willem de Bruijn
0 siblings, 1 reply; 3+ messages in thread
From: Wang Hai @ 2020-09-05 8:50 UTC (permalink / raw)
To: willemdebruijn.kernel, davem, kuba, willemb, john.ogness,
maowenan, jrosen, arnd, colin.king, edumazet
Cc: netdev, linux-kernel
BLOCK_PRIV is never used after it was introduced.
So better to remove it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
---
v1->v2:
Corrected the wrong comment
net/packet/af_packet.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index da8254e680f9..c430672c6a67 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -177,7 +177,6 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
#define BLOCK_LEN(x) ((x)->hdr.bh1.blk_len)
#define BLOCK_SNUM(x) ((x)->hdr.bh1.seq_num)
#define BLOCK_O2PRIV(x) ((x)->offset_to_priv)
-#define BLOCK_PRIV(x) ((void *)((char *)(x) + BLOCK_O2PRIV(x)))
struct packet_sock;
static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev,
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net/packet: Remove unused macro BLOCK_PRIV
2020-09-05 8:50 [PATCH net-next v2] net/packet: Remove unused macro BLOCK_PRIV Wang Hai
@ 2020-09-05 9:15 ` Willem de Bruijn
2020-09-06 17:20 ` Jakub Kicinski
0 siblings, 1 reply; 3+ messages in thread
From: Willem de Bruijn @ 2020-09-05 9:15 UTC (permalink / raw)
To: Wang Hai
Cc: Willem de Bruijn, David Miller, Jakub Kicinski, John Ogness,
Mao Wenan, jrosen, Arnd Bergmann, Colin King, Eric Dumazet,
Network Development, linux-kernel
On Sat, Sep 5, 2020 at 10:53 AM Wang Hai <wanghai38@huawei.com> wrote:
>
> BLOCK_PRIV is never used after it was introduced.
> So better to remove it.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wang Hai <wanghai38@huawei.com>
Acked-by: Willem de Bruijn <willemb@google.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2] net/packet: Remove unused macro BLOCK_PRIV
2020-09-05 9:15 ` Willem de Bruijn
@ 2020-09-06 17:20 ` Jakub Kicinski
0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2020-09-06 17:20 UTC (permalink / raw)
To: Willem de Bruijn
Cc: Wang Hai, David Miller, John Ogness, Mao Wenan, jrosen,
Arnd Bergmann, Colin King, Eric Dumazet, Network Development,
linux-kernel
On Sat, 5 Sep 2020 11:15:05 +0200 Willem de Bruijn wrote:
> On Sat, Sep 5, 2020 at 10:53 AM Wang Hai <wanghai38@huawei.com> wrote:
> >
> > BLOCK_PRIV is never used after it was introduced.
> > So better to remove it.
> >
> > Reported-by: Hulk Robot <hulkci@huawei.com>
> > Signed-off-by: Wang Hai <wanghai38@huawei.com>
>
> Acked-by: Willem de Bruijn <willemb@google.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-06 17:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-05 8:50 [PATCH net-next v2] net/packet: Remove unused macro BLOCK_PRIV Wang Hai
2020-09-05 9:15 ` Willem de Bruijn
2020-09-06 17:20 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).