Commit d2554f50 authored by Maxin B. John's avatar Maxin B. John Committed by Greg Kroah-Hartman

firmware: google: fix gsmi.c build warning

Use min_t() macro instead of min() to fix a build warning:

  CC      drivers/firmware/google/gsmi.o
drivers/firmware/google/gsmi.c: In function ‘gsmi_get_variable’:
drivers/firmware/google/gsmi.c:348: warning: comparison of distinct
pointer types lacks a cast
Signed-off-by: default avatarMaxin B. John <maxin.john@gmail.com>
Acked-By: default avatarMike Waychison <mikew@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5a3072be
...@@ -345,7 +345,8 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name, ...@@ -345,7 +345,8 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name,
memcpy(&param, gsmi_dev.param_buf->start, sizeof(param)); memcpy(&param, gsmi_dev.param_buf->start, sizeof(param));
/* The size reported is the min of all of our buffers */ /* The size reported is the min of all of our buffers */
*data_size = min(*data_size, gsmi_dev.data_buf->length); *data_size = min_t(unsigned long, *data_size,
gsmi_dev.data_buf->length);
*data_size = min_t(unsigned long, *data_size, param.data_len); *data_size = min_t(unsigned long, *data_size, param.data_len);
/* Copy data back to return buffer. */ /* Copy data back to return buffer. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment