Skip to content

Commit

Permalink
ipmi: Use standard MIN() macro definition
Browse files Browse the repository at this point in the history
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>
Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
iamjpn authored and oohal committed Aug 16, 2019
1 parent 41f6c80 commit 851ce56
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hw/ipmi/ipmi-fru.c
Expand Up @@ -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

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 851ce56

Please sign in to comment.