{nb,soc}: Replace min/max() with MIN/MAX()

Use MIN() and MAX() defined in commonlib/helpers.h

Change-Id: I02d0a47937bc2d6ab2cd01995a2c6b6db245da15
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37454
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:
Elyes HAOUAS
2019-12-03 18:22:06 +01:00
committed by Patrick Georgi
parent 836b8d2e45
commit f97c1c9d86
7 changed files with 39 additions and 32 deletions

View File

@@ -16,6 +16,7 @@
#include <smbios.h>
#include "smbios.h"
#include <string.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <device/dram/ddr3.h>
@@ -63,7 +64,7 @@ void dimm_info_fill(struct dimm_info *dimm, u32 dimm_capacity, u8 ddr_type,
strncpy((char *)dimm->module_part_number,
module_part_num,
min(sizeof(dimm->module_part_number),
MIN(sizeof(dimm->module_part_number),
module_part_number_size));
if (module_serial_num)
memcpy(dimm->serial, module_serial_num,