Skip to content

Commit

Permalink
firmware: google: fix gsmi.c build warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxin B. John authored and Greg Kroah-Hartman committed Dec 10, 2011
1 parent 5a3072b commit d2554f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/firmware/google/gsmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit d2554f5

Please sign in to comment.