From f97c1c9d86ff56ba9d1de4fc7c9499742224d365 Mon Sep 17 00:00:00 2001 From: Elyes HAOUAS Date: Tue, 3 Dec 2019 18:22:06 +0100 Subject: {nb,soc}: Replace min/max() with MIN/MAX() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use MIN() and MAX() defined in commonlib/helpers.h Change-Id: I02d0a47937bc2d6ab2cd01995a2c6b6db245da15 Signed-off-by: Elyes HAOUAS Reviewed-on: https://review.coreboot.org/c/coreboot/+/37454 Reviewed-by: Kyösti Mälkki Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/fast_spi/fast_spi_flash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/common/block') diff --git a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c index 0a4344272e..f887b3c800 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c @@ -14,6 +14,7 @@ */ #include +#include #include #include #include @@ -157,11 +158,11 @@ static int exec_sync_hwseq_xfer(struct fast_spi_flash_ctx *ctx, static size_t get_xfer_len(const struct spi_flash *flash, uint32_t addr, size_t len) { - size_t xfer_len = min(len, SPIBAR_FDATA_FIFO_SIZE); + size_t xfer_len = MIN(len, SPIBAR_FDATA_FIFO_SIZE); size_t bytes_left = ALIGN_UP(addr, flash->page_size) - addr; if (bytes_left) - xfer_len = min(xfer_len, bytes_left); + xfer_len = MIN(xfer_len, bytes_left); return xfer_len; } -- cgit v1.2.3