{drivers,southbridge}: Replace min() with MIN()
This is to remove min/max() from <stdlib.h>. Change-Id: Ica03d9aec8a81f57709abcac655dfb0ebce3f8c6 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37818 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
f97c1c9d86
commit
361a935332
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
|
||||
#include <console/console.h>
|
||||
#include <stdlib.h>
|
||||
#include <commonlib/helpers.h>
|
||||
#include <spi_flash.h>
|
||||
#include <spi-generic.h>
|
||||
#include <string.h>
|
||||
@@ -117,7 +117,7 @@ static int atmel_write(const struct spi_flash *flash, u32 offset, size_t len,
|
||||
|
||||
for (actual = 0; actual < len; actual += chunk_len) {
|
||||
byte_addr = offset % page_size;
|
||||
chunk_len = min(len - actual, page_size - byte_addr);
|
||||
chunk_len = MIN(len - actual, page_size - byte_addr);
|
||||
chunk_len = spi_crop_chunk(&flash->spi, sizeof(cmd), chunk_len);
|
||||
|
||||
cmd[0] = CMD_AT25_PP;
|
||||
|
Reference in New Issue
Block a user