From patchwork Thu May 26 02:16:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 626524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rFY5m0yt0z9t42 for ; Thu, 26 May 2016 12:30:20 +1000 (AEST) Received: from localhost ([::1]:36074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5l3y-0004I8-3P for incoming@patchwork.ozlabs.org; Wed, 25 May 2016 22:30:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5krF-0007Gb-ES for qemu-devel@nongnu.org; Wed, 25 May 2016 22:17:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5krE-0001Xl-Ao for qemu-devel@nongnu.org; Wed, 25 May 2016 22:17:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5krE-0001Xh-4y for qemu-devel@nongnu.org; Wed, 25 May 2016 22:17:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA2ADC04B303; Thu, 26 May 2016 02:17:07 +0000 (UTC) Received: from jason-ThinkPad-T450s.redhat.com (vpn1-4-12.pek2.redhat.com [10.72.4.12]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4Q2GaLJ032564; Wed, 25 May 2016 22:17:05 -0400 From: Jason Wang To: peter.maydell@linaro.org, qemu-devel@nongnu.org Date: Thu, 26 May 2016 10:16:25 +0800 Message-Id: <1464228995-26657-11-git-send-email-jasowang@redhat.com> In-Reply-To: <1464228995-26657-1-git-send-email-jasowang@redhat.com> References: <1464228995-26657-1-git-send-email-jasowang@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 26 May 2016 02:17:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL V3 10/20] vmxnet3: Use common MAC address tracing macros X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leonid Bloch , Jason Wang , Dmitry Fleytman Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Dmitry Fleytman Reviewed-by: Michael S. Tsirkin Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 8 ++++---- hw/net/vmxnet_debug.h | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 586e915..200d2ea 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -474,7 +474,7 @@ static void vmxnet3_set_variable_mac(VMXNET3State *s, uint32_t h, uint32_t l) s->conf.macaddr.a[4] = VMXNET3_GET_BYTE(h, 0); s->conf.macaddr.a[5] = VMXNET3_GET_BYTE(h, 1); - VMW_CFPRN("Variable MAC: " VMXNET_MF, VMXNET_MA(s->conf.macaddr.a)); + VMW_CFPRN("Variable MAC: " MAC_FMT, MAC_ARG(s->conf.macaddr.a)); qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); } @@ -1219,7 +1219,7 @@ static void vmxnet3_reset_interrupt_states(VMXNET3State *s) static void vmxnet3_reset_mac(VMXNET3State *s) { memcpy(&s->conf.macaddr.a, &s->perm_mac.a, sizeof(s->perm_mac.a)); - VMW_CFPRN("MAC address set to: " VMXNET_MF, VMXNET_MA(s->conf.macaddr.a)); + VMW_CFPRN("MAC address set to: " MAC_FMT, MAC_ARG(s->conf.macaddr.a)); } static void vmxnet3_deactivate_device(VMXNET3State *s) @@ -1301,7 +1301,7 @@ static void vmxnet3_update_mcast_filters(VMXNET3State *s) cpu_physical_memory_read(mcast_list_pa, s->mcast_list, list_bytes); VMW_CFPRN("Current multicast list len is %d:", s->mcast_list_len); for (i = 0; i < s->mcast_list_len; i++) { - VMW_CFPRN("\t" VMXNET_MF, VMXNET_MA(s->mcast_list[i].a)); + VMW_CFPRN("\t" MAC_FMT, MAC_ARG(s->mcast_list[i].a)); } } } @@ -2102,7 +2102,7 @@ static void vmxnet3_net_init(VMXNET3State *s) s->link_status_and_speed = VMXNET3_LINK_SPEED | VMXNET3_LINK_STATUS_UP; - VMW_CFPRN("Permanent MAC: " VMXNET_MF, VMXNET_MA(s->perm_mac.a)); + VMW_CFPRN("Permanent MAC: " MAC_FMT, MAC_ARG(s->perm_mac.a)); s->nic = qemu_new_nic(&net_vmxnet3_info, &s->conf, object_get_typename(OBJECT(s)), diff --git a/hw/net/vmxnet_debug.h b/hw/net/vmxnet_debug.h index 96495db..5aab00b 100644 --- a/hw/net/vmxnet_debug.h +++ b/hw/net/vmxnet_debug.h @@ -142,7 +142,4 @@ } \ } while (0) -#define VMXNET_MF "%02X:%02X:%02X:%02X:%02X:%02X" -#define VMXNET_MA(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] - #endif /* _QEMU_VMXNET3_DEBUG_H */