[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH 06/17] imx_fec: Use MIN instead of explicit ternary op
From: |
Andrey Smirnov |
Subject: |
[Qemu-arm] [PATCH 06/17] imx_fec: Use MIN instead of explicit ternary operator |
Date: |
Mon, 18 Sep 2017 12:50:49 -0700 |
Cc: Peter Maydell <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: address@hidden
Cc: address@hidden
Cc: 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 989c11be5f..8a77136d38 100644
--- a/hw/net/imx_fec.c
+++ b/hw/net/imx_fec.c
@@ -1074,7 +1074,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 00/17] Initial i.MX7 support, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 03/17] imx_fec: Refactor imx_eth_enable_rx(), Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 02/17] imx_fec: Do not calculate FEC, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 01/17] imx_fec: Do not link to netdev, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 04/17] imx_fec: Change queue flushing heuristics, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 05/17] imx_fec: Use ENET_FTRL to determine truncation length, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 06/17] imx_fec: Use MIN instead of explicit ternary operator,
Andrey Smirnov <=
- [Qemu-arm] [PATCH 07/17] imx_fec: Emulate SHIFT16 in ENETx_RACC, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 08/17] imx_fec: Add support for multiple Tx DMA rings, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 10/17] sdhci: Add i.MX specific subtype of SDHCI, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 12/17] i.MX: Add i.MX7 CCM, PMU and ANALOG device, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 09/17] imx_fec: Use correct length for packet size, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 11/17] sdhci: Implement write method of ACMD12ERRSTS register, Andrey Smirnov, 2017/09/18
- [Qemu-arm] [PATCH 13/17] i.MX: Add code to emulate i.MX2 watchdog IP block, Andrey Smirnov, 2017/09/18