Skip to contentSkip to conversation

net: Remove useless local var pkt

PATCH Applied Fam Zheng 3 participants 3 messages Feb 15, 2017 – Feb 17, 2017

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH 1/1 net: Remove useless local var pkt

This has been pointless since commit 605d52e62, which was a search-and-replace, overlooked the redundancy.

---
 hw/net/net_rx_pkt.c | 1 -
 1 file changed, 1 deletion(-)
hw/net/net_rx_pkt.c +0 -1
index 1019b50..7f928d7 100644
@@ -159,7 +159,6 @@ void net_rx_pkt_attach_iovec_ex(struct NetRxPkt *pkt,
 void net_rx_pkt_dump(struct NetRxPkt *pkt)
 {
 #ifdef NET_RX_PKT_DEBUG
-    NetRxPkt *pkt = (NetRxPkt *)pkt;
     assert(pkt);
 
     printf("RX PKT: tot_len: %d, vlan_stripped: %d, vlan_tag: %d\n",
Signature · 1 line
2.9.3
Reviewed-by on v1 1/1
#1 lore raw

This patch also fixes compilation with NET_RX_PKT_DEBUG defined.

Quoted 25 lines · Fam Zheng

This has been pointless since commit 605d52e62, which was a search-and-replace, overlooked the redundancy.

---
hw/net/net_rx_pkt.c | 1 -

1 file changed, 1 deletion(-)
hw/net/net_rx_pkt.c +0 -1
index 1019b50..7f928d7 100644
@@ -159,7 +159,6 @@ void net_rx_pkt_attach_iovec_ex(struct NetRxPkt *pkt,
 void net_rx_pkt_dump(struct NetRxPkt *pkt)
 {
 #ifdef NET_RX_PKT_DEBUG
-    NetRxPkt *pkt = (NetRxPkt *)pkt;
    assert(pkt);
 
    printf("RX PKT: tot_len: %d, vlan_stripped: %d, vlan_tag: %d\n",
Signature · 1 line
2.9.3
Applied
#2 lore raw
Quoted 25 lines · Dmitry Fleytman

This patch also fixes compilation with NET_RX_PKT_DEBUG defined.

Quoted 21 lines · Fam Zheng

This has been pointless since commit 605d52e62, which was a search-and-replace, overlooked the redundancy.

---
hw/net/net_rx_pkt.c | 1 -

1 file changed, 1 deletion(-)
hw/net/net_rx_pkt.c +0 -1
index 1019b50..7f928d7 100644
@@ -159,7 +159,6 @@ void net_rx_pkt_attach_iovec_ex(struct NetRxPkt *pkt,
 void net_rx_pkt_dump(struct NetRxPkt *pkt)
 {
 #ifdef NET_RX_PKT_DEBUG
-    NetRxPkt *pkt = (NetRxPkt *)pkt;
     assert(pkt);
 
Quoted 4 lines
Quoted 4 lines
hw/net/net_rx_pkt.c +0 -0
     printf("RX PKT: tot_len: %d, vlan_stripped: %d, vlan_tag: %d\n",
Signature · 1 line
2.9.3

Applied, thanks.