Message ID | 20190808061142.10958-1-jniethe5@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | ipmi: Use standard MIN() macro definition | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (0e1db80c70477d89a73c7f2a1a7e19c7d8292c5f) |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot | success | Test snowpatch/job/snowpatch-skiboot on branch master |
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco | success | Signed-off-by present |
On 08/08/2019 11:41 AM, Jordan Niethe wrote: > There is a MIN() macro definition in skiboot.h. Remove the redundant > definition from here and use that one. Thanks for the cleanup. Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> -Vasant
diff --git a/hw/ipmi/ipmi-fru.c b/hw/ipmi/ipmi-fru.c index c66f2e14c458..10f432589772 100644 --- a/hw/ipmi/ipmi-fru.c +++ b/hw/ipmi/ipmi-fru.c @@ -33,8 +33,6 @@ struct common_header { u8 checksum; } __packed; -#define min(x,y) ((x) < (y) ? x : y) - /* The maximum amount of FRU data we can store. */ #define FRU_DATA_SIZE 256 @@ -220,7 +218,7 @@ static int fru_write(void) /* Three bytes for the actual FRU Data Command */ msg->data[WRITE_INDEX] = 0; msg->data[REMAINING] = len; - msg->req_size = min(len + 3, IPMI_MAX_REQ_SIZE); + msg->req_size = MIN(len + 3, IPMI_MAX_REQ_SIZE); return ipmi_queue_msg(msg); }
There is a MIN() macro definition in skiboot.h. Remove the redundant definition from here and use that one. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> --- hw/ipmi/ipmi-fru.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)