From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34891) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UL8aj-00059C-87 for qemu-devel@nongnu.org; Thu, 28 Mar 2013 04:53:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UL8ag-0000OX-Dm for qemu-devel@nongnu.org; Thu, 28 Mar 2013 04:53:49 -0400 Received: from mail-we0-x231.google.com ([2a00:1450:400c:c03::231]:43314) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UL8ag-0000OP-7a for qemu-devel@nongnu.org; Thu, 28 Mar 2013 04:53:46 -0400 Received: by mail-we0-f177.google.com with SMTP id o45so3075669wer.22 for ; Thu, 28 Mar 2013 01:53:45 -0700 (PDT) From: Dmitry Fleytman Date: Thu, 28 Mar 2013 10:53:30 +0200 Message-Id: <1364460810-24876-3-git-send-email-dmitry@daynix.com> In-Reply-To: <1364460810-24876-1-git-send-email-dmitry@daynix.com> References: <1364460810-24876-1-git-send-email-dmitry@daynix.com> Subject: [Qemu-devel] [2/2] [vmxnet3] const_cpu_to_le64 wrapping for feature bits dropped List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Dmitry Fleytman , Yan Vugenfirer , Stefan Hajnoczi , Anthony Liguori , Paolo Bonzini Byte swap is redundant because shared memory reading functions already swap bytes when required Signed-off-by: Dmitry Fleytman --- 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 -- 1.8.1.4