[PATCH] fimware: fix build warning

From: stufever
Date: Sat Aug 06 2011 - 12:42:35 EST


From: Wang Shaoyan <wangshaoyan.pt@xxxxxxxxxx>

drivers/firmware/google/gsmi.c: In function 'gsmi_get_variable':
drivers/firmware/google/gsmi.c:347: warning: comparison of distinct pointer types lacks a cast
drivers/firmware/google/gsmi.c: At top level:
drivers/firmware/google/gsmi.c:473: warning: initialization from incompatible pointer type

Signed-off-by: Wang Shaoyan <wangshaoyan.pt@xxxxxxxxxx>
---
drivers/firmware/google/gsmi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index 68810fd..711753f 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -344,7 +344,7 @@ static efi_status_t gsmi_get_variable(efi_char16_t *name,
memcpy(&param, 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. */
@@ -420,7 +420,7 @@ static efi_status_t gsmi_get_next_variable(unsigned long *name_size,

static efi_status_t gsmi_set_variable(efi_char16_t *name,
efi_guid_t *vendor,
- unsigned long attr,
+ u32 attr,
unsigned long data_size,
void *data)
{
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/