firmware: google: fix gsmi.c build warning
PATCH 1/1 firmware: google: fix gsmi.c build warning
Use min_t() macro instead of min() to fix a build warning:
CC drivers/firmware/google/gsmi.odrivers/firmware/google/gsmi.c: In function ‘gsmi_get_variable’:drivers/firmware/google/gsmi.c:348: warning: comparison of distinct pointer types lacks a cast
---
drivers/firmware/google/gsmi.c +2 -1
@@ -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. */
Quoted 2 lines · Maxin B. John
Use
min_t()macro instead ofmin()to fix a build warning:
Looks good. Greg, could you please pull this into your drivers tree?
Quoted 21 lines
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 castSigned-off-by Maxin B. John <[email protected]>---
drivers/firmware/google/gsmi.c +2
-1@@ -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. */
Quoted 5 lines · Mike Waychison
Quoted 2 lines · Maxin B. John
Use
min_t()macro instead ofmin()to fix a build warning:Looks good. Greg, could you please pull this into your drivers tree?
Yes I will if you ack it :)
greg k-h
Mike Waychison
Acked-byQuoted 8 lines · Greg KH
Quoted 5 lines · Mike Waychison
Quoted 2 lines · Maxin B. John
Use
min_t()macro instead ofmin()to fix a build warning:Looks good. Greg, could you please pull this into your drivers tree?
Yes I will if you ack it :)
Quoted 2 lines
greg k-h
Quoted 11 lines · Mike Waychison
Quoted 8 lines · Greg KH
Quoted 5 lines · Mike Waychison
Quoted 2 lines · Maxin B. John
Use
min_t()macro instead ofmin()to fix a build warning:Looks good. Greg, could you please pull this into your drivers tree?
Yes I will if you ack it :)
Acked-by Mike Waychison <[email protected]>
Thanks !
Quoted 2 lines
Quoted 2 lines
greg k-h
Warm Regards,
Maxin B. John
Quoted 4 lines · Maxin B John
Quoted 3 lines · Mike Waychison
Quoted 2 lines · Greg KH
Quoted 1 line · Mike Waychison
On Wed, Nov 30, 2011 at 3:37 PM, Maxin B. John <[email protected]> wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Use
min_t()macro instead ofmin()to fix a build warning:Looks good. Greg, could you please pull this into your drivers tree?
Yes I will if you ack it :)
Acked-by Mike Waychison <[email protected]>
Greg, Ping ..
Quoted 8 lines · Maxin B John
Quoted 7 lines · Maxin B John
Quoted 6 lines · Mike Waychison
Quoted 5 lines · Greg KH
Quoted 4 lines · Mike Waychison
Quoted 2 lines · Maxin B. John
Use
min_t()macro instead ofmin()to fix a build warning:
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Looks good. Greg, could you please pull this into your drivers tree?
Yes I will if you ack it :)
Acked-by Mike Waychison <[email protected]>Greg, Ping ..
It's in my queue, patience please.
greg k-h