[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v2 06/15] imx_fec: Use MIN instead of explicit ternary
From: |
Andrey Smirnov |
Subject: |
[Qemu-arm] [PATCH v2 06/15] imx_fec: Use MIN instead of explicit ternary operator |
Date: |
Thu, 14 Dec 2017 06:52:46 -0800 |
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 50da91bf9e..6feda18742 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.14.3
- [Qemu-arm] [PATCH v2 00/15] i.MX FEC and SD changes, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 02/15] imx_fec: Refactor imx_eth_enable_rx(), Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 01/15] imx_fec: Do not link to netdev, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 03/15] imx_fec: Change queue flushing heuristics, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 04/15] imx_fec: Move Tx frame buffer away from the stack, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 05/15] imx_fec: Use ENET_FTRL to determine truncation length, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 06/15] imx_fec: Use MIN instead of explicit ternary operator,
Andrey Smirnov <=
- [Qemu-arm] [PATCH v2 07/15] imx_fec: Emulate SHIFT16 in ENETx_RACC, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 08/15] imx_fec: Add support for multiple Tx DMA rings, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 10/15] imx_fec: Fix a typo in imx_enet_receive(), Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 09/15] imx_fec: Use correct length for packet size, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 11/15] imx_fec: Reserve full FSL_IMX25_FEC_SIZE page for the register file, Andrey Smirnov, 2017/12/14
- [Qemu-arm] [PATCH v2 12/15] sdhci: Add i.MX specific subtype of SDHCI, Andrey Smirnov, 2017/12/14