[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGTjWtCy_syX18y23mUD7HZJe3fdjUDCY7YDMwKesFFjd4VwZQ@mail.gmail.com>
Date: Wed, 30 Nov 2011 15:56:25 -0800
From: Mike Waychison <mikew@...gle.com>
To: "Maxin B. John" <maxin.john@...il.com>
Cc: linux-kernel@...r.kernel.org, gregkh@...e.de,
paul.gortmaker@...driver.com, dlaurie@...gle.com,
adurbin@...gle.com
Subject: Re: [PATCH] firmware: google: fix gsmi.c build warning
On Wed, Nov 30, 2011 at 3:37 PM, Maxin B. John <maxin.john@...il.com> wrote:
> Use min_t() macro instead of min() to fix a build warning:
>
Looks good. Greg, could you please pull this into your drivers tree?
> 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@...il.com>
> ---
> diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
> index c4e7c59..91ddf0f 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. */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists