[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v2 05/27] imx_fec: Use MIN instead of explicit ternary
From: |
Andrey Smirnov |
Subject: |
[Qemu-arm] [PATCH v2 05/27] imx_fec: Use MIN instead of explicit ternary operator |
Date: |
Mon, 23 Oct 2017 13:10:33 -0700 |
Cc: Peter Maydell <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: Philippe Mathieu-Daudé <address@hidden>
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Andrey Smirnov <address@hidden>
---
hw/net/imx_fec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/imx_fec.c b/hw/net/imx_fec.c
index dda0816fb3..18de508e8c 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -1076,7 +1076,7 @@ static ssize_t imx_enet_receive(NetClientState *nc, const
uint8_t *buf,
TYPE_IMX_FEC, __func__);
break;
}
- buf_len = (size <= s->regs[ENET_MRBR]) ? size : s->regs[ENET_MRBR];
+ buf_len = MIN(size, s->regs[ENET_MRBR]);
bd.length = buf_len;
size -= buf_len;
--
2.13.5
- [Qemu-arm] [PATCH v2 00/27] Initial i.MX7 support, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 01/27] imx_fec: Do not link to netdev, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 02/27] imx_fec: Refactor imx_eth_enable_rx(), Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 04/27] imx_fec: Use ENET_FTRL to determine truncation length, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 05/27] imx_fec: Use MIN instead of explicit ternary operator,
Andrey Smirnov <=
- [Qemu-arm] [PATCH v2 03/27] imx_fec: Change queue flushing heuristics, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 06/27] imx_fec: Emulate SHIFT16 in ENETx_RACC, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 07/27] imx_fec: Add support for multiple Tx DMA rings, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 08/27] imx_fec: Use correct length for packet size, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 09/27] imx_fec: Fix a typo in imx_enet_receive(), Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 10/27] imx_fec: Reserve full 4K page for the register file, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 14/27] i.MX: Add code to emulate i.MX2 watchdog IP block, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 11/27] sdhci: Add i.MX specific subtype of SDHCI, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 12/27] sdhci: Implement write method of ACMD12ERRSTS register, Andrey Smirnov, 2017/10/23
- [Qemu-arm] [PATCH v2 15/27] i.MX: Add code to emulate i.MX7 SNVS IP-block, Andrey Smirnov, 2017/10/23