Received: from eggs.gnu.org ([2001:4830:134:3::10]:34695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emBBa-0008Fo-QE for qemu-devel@nongnu.org; Wed, 14 Feb 2018 23:30:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emBBZ-0004Mt-Po for qemu-devel@nongnu.org; Wed, 14 Feb 2018 23:30:18 -0500 Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 15 Feb 2018 01:28:53 -0300 Message-Id: <20180215042900.16078-24-f4bug@amsat.org> In-Reply-To: <20180215042900.16078-1-f4bug@amsat.org> References: <20180215042900.16078-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH 23/30] hw/net: use the BYTE-based definitions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Dmitry Fleytman , Jason Wang , Stefan Weil , Beniamino Galvani , "open list:Allwinner-a10" It ease code review, unit is explicit. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/net/allwinner_emac.h | 4 ++-- hw/net/e1000e.c | 6 +++--- hw/net/eepro100.c | 6 ++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/include/hw/net/allwinner_emac.h b/include/hw/net/allwinner_emac.h index 4cc8aab7ec..93ec0e7067 100644 --- a/include/hw/net/allwinner_emac.h +++ b/include/hw/net/allwinner_emac.h @@ -125,8 +125,8 @@ #define EMAC_INT_RX (1 << 8) /* Due to lack of specifications, size of fifos is chosen arbitrarily */ -#define TX_FIFO_SIZE (4 * 1024) -#define RX_FIFO_SIZE (32 * 1024) +#define TX_FIFO_SIZE (4 * K_BYTE) +#define RX_FIFO_SIZE (32 * K_BYTE) #define NUM_TX_FIFOS 2 #define RX_HDR_SIZE 8 diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 16a9417a85..767b35fca8 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -81,10 +81,10 @@ typedef struct E1000EState { #define E1000E_IO_IDX 2 #define E1000E_MSIX_IDX 3 -#define E1000E_MMIO_SIZE (128 * 1024) -#define E1000E_FLASH_SIZE (128 * 1024) +#define E1000E_MMIO_SIZE (128 * K_BYTE) +#define E1000E_FLASH_SIZE (128 * K_BYTE) #define E1000E_IO_SIZE (32) -#define E1000E_MSIX_SIZE (16 * 1024) +#define E1000E_MSIX_SIZE (16 * K_BYTE) #define E1000E_MSIX_TABLE (0x0000) #define E1000E_MSIX_PBA (0x2000) diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c index a07a63247e..6fdeb05259 100644 --- a/hw/net/eepro100.c +++ b/hw/net/eepro100.c @@ -60,8 +60,6 @@ * changed to pad short packets itself. */ #define CONFIG_PAD_RECEIVED_FRAMES -#define KiB 1024 - /* Debug EEPRO100 card. */ #if 0 # define DEBUG_EEPRO100 @@ -104,9 +102,9 @@ /* Use 64 word EEPROM. TODO: could be a runtime option. */ #define EEPROM_SIZE 64 -#define PCI_MEM_SIZE (4 * KiB) +#define PCI_MEM_SIZE (4 * K_BYTE) #define PCI_IO_SIZE 64 -#define PCI_FLASH_SIZE (128 * KiB) +#define PCI_FLASH_SIZE (128 * K_BYTE) #define BITS(n, m) (((0xffffffffU << (31 - n)) >> (31 - n + m)) << m) -- 2.16.1