提交 d2554f50 编写于 作者: M Maxin B. John 提交者: 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: NMaxin B. John <maxin.john@gmail.com>
Acked-By: NMike Waychison <mikew@google.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册