From patchwork Wed Jun 1 08:23:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Fleytman X-Patchwork-Id: 9146437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 228FA60757 for ; Wed, 1 Jun 2016 08:38:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13F70200E7 for ; Wed, 1 Jun 2016 08:38:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08FA526538; Wed, 1 Jun 2016 08:38:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C58A2200E7 for ; Wed, 1 Jun 2016 08:38:23 +0000 (UTC) Received: from localhost ([::1]:40897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b81fR-0003xi-OC for patchwork-qemu-devel@patchwork.kernel.org; Wed, 01 Jun 2016 04:38:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b81Rn-0000rg-8t for qemu-devel@nongnu.org; Wed, 01 Jun 2016 04:24:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b81Ri-0000Ai-Ov for qemu-devel@nongnu.org; Wed, 01 Jun 2016 04:24:15 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:33984) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b81Ri-0000Ae-Hy for qemu-devel@nongnu.org; Wed, 01 Jun 2016 04:24:10 -0400 Received: by mail-wm0-x241.google.com with SMTP id n184so3888983wmn.1 for ; Wed, 01 Jun 2016 01:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=++iAmnpUnXq0eTUKDeIbDWntTM+r2RXIJ0LI+smuzNo=; b=a1H6UCE7Qsu7S39jU1XxscW2I9PKlDxKWvBu0GPU6gUrV/WMdNdZqH5r1EdGJtFXeI uMM8ncqgl2SEo8eg9lMJk+igMOuB4ZV7z5wd8KoNjRBaYDRyCm6l8lFQdcduaUs2zhuV 8gDgFVbh0u2h3TRQXVLQHKjjWrb3qj6bWwHeu35YiP+Fy208YnVVJcmbfgpTq9WQH/66 gQU4mPADRydslx21KWNpH2NJaqu5N+N1IhegNAwhvOvEAk195zVHSFVu+IaSP69jzgqq Kq/ZJchiU9WVn13AMcSb+zQmLRiUfOFZOUhzsnceQJQ+vd5AmkL/EtdZxTREdog+tkHT EeKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=++iAmnpUnXq0eTUKDeIbDWntTM+r2RXIJ0LI+smuzNo=; b=m4N3p6rwpTj0t+Mt5X/mRj6WSuOXn/V7w9ZXy3z3WrweTowTDpQcllx7jHDzNDhxhh PdedHdMA+WLwgk4eFIagXXRd/dM9Yajs9sH4xlHuUwrB9QVguBb7fhgGJNDegK7EC91d 4L67l93R+jFsK9ZuzbOJ2WsIObSXuFr7k/hrzVIDT943qZNwAp1/+vxctBpt7/EUmkYQ rn5ohOazILoVOYjk29o5CmkUAADWV2RUlKqLNDN7ERhmQp4ERAoRUovnq0LHjtDdTOuN zqQD/2/2Ql+H1UEsf/sphmFgs33repu9lAb3Zv/i8A3SPzsvd4y85Gnv+aA7GgFJ8PmV hPPQ== X-Gm-Message-State: ALyK8tIYMYL9wDXKp5DR7FcRv9ssjNsEEXEj4LiPSH/HE3E4Q2Pa96P53wQL32znzUuSww== X-Received: by 10.28.16.17 with SMTP id 17mr19088306wmq.17.1464769449988; Wed, 01 Jun 2016 01:24:09 -0700 (PDT) Received: from bark.daynix ([5.102.236.99]) by smtp.gmail.com with ESMTPSA id o10sm29242719wjz.37.2016.06.01.01.24.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 01:24:09 -0700 (PDT) From: Dmitry Fleytman To: qemu-devel@nongnu.org Date: Wed, 1 Jun 2016 11:23:38 +0300 Message-Id: <1464769426-22276-10-git-send-email-dmitry@daynix.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464769426-22276-1-git-send-email-dmitry@daynix.com> References: <1464769426-22276-1-git-send-email-dmitry@daynix.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH v8 09/17] 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: Yan Vugenfirer , Jason Wang , Leonid Bloch , Shmulik Ladkani , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Dmitry Fleytman Signed-off-by: Dmitry Fleytman Signed-off-by: Leonid Bloch Reviewed-by: Michael S. Tsirkin --- 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 */