From patchwork Mon Apr 8 12:42:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 234755 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B90CE2C00FC for ; Mon, 8 Apr 2013 22:43:45 +1000 (EST) Received: from localhost ([::1]:36595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPBQD-0006PQ-LD for incoming@patchwork.ozlabs.org; Mon, 08 Apr 2013 08:43:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPBPp-0006P2-HW for qemu-devel@nongnu.org; Mon, 08 Apr 2013 08:43:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPBPh-0000Uu-Dg for qemu-devel@nongnu.org; Mon, 08 Apr 2013 08:43:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPBPh-0000Up-6S for qemu-devel@nongnu.org; Mon, 08 Apr 2013 08:43:09 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r38Ch7Cs002149 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Apr 2013 08:43:07 -0400 Received: from localhost (ovpn-112-48.ams2.redhat.com [10.36.112.48]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r38Ch6QY028404; Mon, 8 Apr 2013 08:43:07 -0400 From: Stefan Hajnoczi To: Date: Mon, 8 Apr 2013 14:42:58 +0200 Message-Id: <1365424978-4348-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1365424978-4348-1-git-send-email-stefanha@redhat.com> References: <1365424978-4348-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Dmitry Fleytman , Anthony Liguori , Stefan Hajnoczi , rth@twiddle.net Subject: [Qemu-devel] [PATCH 2/2] vmxnet3: const_cpu_to_le64 wrapping for feature bits dropped X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Dmitry Fleytman Byte swap is redundant because shared memory reading functions already swap bytes when required Signed-off-by: Dmitry Fleytman Acked-by: Alexander Graf Signed-off-by: Stefan Hajnoczi --- hw/vmxnet3.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/hw/vmxnet3.h b/hw/vmxnet3.h index 7db0c8f..4eae7c7 100644 --- a/hw/vmxnet3.h +++ b/hw/vmxnet3.h @@ -37,10 +37,8 @@ #define __packed QEMU_PACKED #if defined(HOST_WORDS_BIGENDIAN) -#define const_cpu_to_le64(x) bswap_64(x) #define __BIG_ENDIAN_BITFIELD #else -#define const_cpu_to_le64(x) (x) #endif /* @@ -137,10 +135,10 @@ struct UPT1_RSSConf { /* features */ enum { - UPT1_F_RXCSUM = const_cpu_to_le64(0x0001), /* rx csum verification */ - UPT1_F_RSS = const_cpu_to_le64(0x0002), - UPT1_F_RXVLAN = const_cpu_to_le64(0x0004), /* VLAN tag stripping */ - UPT1_F_LRO = const_cpu_to_le64(0x0008), + UPT1_F_RXCSUM = 0x0001, /* rx csum verification */ + UPT1_F_RSS = 0x0002, + UPT1_F_RXVLAN = 0x0004, /* VLAN tag stripping */ + UPT1_F_LRO = 0x0008, }; /* all registers are 32 bit wide */ @@ -752,7 +750,6 @@ struct Vmxnet3_DriverShared { #undef __le32 #undef __le64 #undef __packed -#undef const_cpu_to_le64 #if defined(HOST_WORDS_BIGENDIAN) #undef __BIG_ENDIAN_BITFIELD #endif