[Qemu-devel] [PATCH] net: Remove useless local var pkt

Fam Zheng posted 1 patch 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170215083143.15897-1-famz@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
hw/net/net_rx_pkt.c | 1 -
1 file changed, 1 deletion(-)
[Qemu-devel] [PATCH] net: Remove useless local var pkt
Posted by Fam Zheng 7 years, 2 months ago
This has been pointless since commit 605d52e62, which was a
search-and-replace, overlooked the redundancy.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 hw/net/net_rx_pkt.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
index 1019b50..7f928d7 100644
--- a/hw/net/net_rx_pkt.c
+++ b/hw/net/net_rx_pkt.c
@@ -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",
-- 
2.9.3


Re: [Qemu-devel] [PATCH] net: Remove useless local var pkt
Posted by Dmitry Fleytman 7 years, 2 months ago
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>

This patch also fixes compilation with NET_RX_PKT_DEBUG defined.

> On 15 Feb 2017, at 10:31 AM, Fam Zheng <famz@redhat.com> wrote:
> 
> This has been pointless since commit 605d52e62, which was a
> search-and-replace, overlooked the redundancy.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
> hw/net/net_rx_pkt.c | 1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
> index 1019b50..7f928d7 100644
> --- a/hw/net/net_rx_pkt.c
> +++ b/hw/net/net_rx_pkt.c
> @@ -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",
> -- 
> 2.9.3
> 

Re: [Qemu-devel] [PATCH] net: Remove useless local var pkt
Posted by Jason Wang 7 years, 2 months ago

On 2017年02月15日 16:58, Dmitry Fleytman wrote:
> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
>
> This patch also fixes compilation with NET_RX_PKT_DEBUG defined.
>
>> On 15 Feb 2017, at 10:31 AM, Fam Zheng <famz@redhat.com> wrote:
>>
>> This has been pointless since commit 605d52e62, which was a
>> search-and-replace, overlooked the redundancy.
>>
>> Signed-off-by: Fam Zheng <famz@redhat.com>
>> ---
>> hw/net/net_rx_pkt.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/hw/net/net_rx_pkt.c b/hw/net/net_rx_pkt.c
>> index 1019b50..7f928d7 100644
>> --- a/hw/net/net_rx_pkt.c
>> +++ b/hw/net/net_rx_pkt.c
>> @@ -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",
>> -- 
>> 2.9.3
>>

Applied, thanks.