From d2554f50df9be3c53a13f7541a5f4d054bd56cc3 Mon Sep 17 00:00:00 2001 From: "Maxin B. John" Date: Thu, 1 Dec 2011 01:37:33 +0200 Subject: [PATCH] firmware: google: fix gsmi.c build warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-By: Mike Waychison Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/google/gsmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index c4e7c59d1c63..91ddf0f7a1b9 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, memcpy(¶m, gsmi_dev.param_buf->start, sizeof(param)); /* 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); /* Copy data back to return buffer. */ -- 2.39.5