Skip to contentSkip to conversation

firmware: google: fix gsmi.c build warning

PATCH In review Maxin B. John 3 participants 7 messages Nov 30, 2011 – Dec 7, 2011

lore
Share & tools
lore
#0 lore raw

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.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

---

drivers/firmware/google/gsmi.c +2 -1
index c4e7c59..91ddf0f 100644
@@ -345,7 +345,8 @@ 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. */
#1 lore raw
Quoted 2 lines · Maxin B. John

Use min_t() macro instead of min() 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 cast

---

drivers/firmware/google/gsmi.c +2 -1
index c4e7c59..91ddf0f 100644
@@ -345,7 +345,8 @@ 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. */
#2 lore raw
Quoted 5 lines · Mike Waychison
Quoted 2 lines · Maxin B. John

Use min_t() macro instead of min() 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

#3 lore raw
Quoted 8 lines · Greg KH
Quoted 5 lines · Mike Waychison
Quoted 2 lines · Maxin B. John

Use min_t() macro instead of min() 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

#4 lore raw
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 of min() to fix a build warning:

Looks good.  Greg, could you please pull this into your drivers tree?

Yes I will if you ack it :)

Thanks !

Quoted 2 lines
Quoted 2 lines

greg k-h

Warm Regards,
Maxin B. John

#5 lore raw
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 of min() 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, Ping ..

#6 lore raw
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 of min() 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 :)

Greg, Ping ..

It's in my queue, patience please.

greg k-h