diff options
author | Maxin B. John <maxin.john@gmail.com> | 2011-11-30 18:37:33 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-12-09 19:23:49 -0500 |
commit | d2554f50df9be3c53a13f7541a5f4d054bd56cc3 (patch) | |
tree | 71443fba0d84861b5f2b4b8025768b98b3ca776d /drivers/firmware | |
parent | 5a3072be6ce00b10565c78da05ad78df41310045 (diff) |
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: Maxin B. John <maxin.john@gmail.com>
Acked-By: Mike Waychison <mikew@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/firmware')
-rw-r--r-- | drivers/firmware/google/gsmi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index c4e7c59d1c6..91ddf0f7a1b 100644 --- a/drivers/firmware/google/gsmi.c +++ b/drivers/firmware/google/gsmi.c | |||
@@ -345,7 +345,8 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name, | |||
345 | memcpy(¶m, gsmi_dev.param_buf->start, sizeof(param)); | 345 | memcpy(¶m, gsmi_dev.param_buf->start, sizeof(param)); |
346 | 346 | ||
347 | /* The size reported is the min of all of our buffers */ | 347 | /* The size reported is the min of all of our buffers */ |
348 | *data_size = min(*data_size, gsmi_dev.data_buf->length); | 348 | *data_size = min_t(unsigned long, *data_size, |
349 | gsmi_dev.data_buf->length); | ||
349 | *data_size = min_t(unsigned long, *data_size, param.data_len); | 350 | *data_size = min_t(unsigned long, *data_size, param.data_len); |
350 | 351 | ||
351 | /* Copy data back to return buffer. */ | 352 | /* Copy data back to return buffer. */ |