Re: [PATCH V2 6/9] efivars: String functions

From: Tony Luck
Date: Tue Aug 02 2011 - 12:48:38 EST


On Thu, Jul 21, 2011 at 1:57 PM, Matthew Garrett <mjg@xxxxxxxxxx> wrote:
> +static unsigned long
> +utf16_strlen(efi_char16_t *s)
> +{
> +       return utf16_strnlen(s, ~0UL);
> +}
> +

When building with CONFIG_PSTORE=n, I see a warning:

drivers/firmware/efivars.c:161: warning: ‘utf16_strlen’ defined but not used

I can just slap:

#ifdef CONFIG_PSTORE
...
#endif

around this function definition - but I wondered if there was a better way
to fix it?

-Tony

Also with CONFIG_PSTORE=n I see:
drivers/firmware/efivars.c:602: warning: initialization from
incompatible pointer type
but that one just needs the stub definition of "efi_pstore_write" to
match the real
definition with "part" being unsigned.
--
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/