From: Tony Luck Date: Tue, 2 Aug 2011 22:08:30 +0000 (-0700) Subject: efivars: fix warnings when CONFIG_PSTORE=n X-Git-Tag: firefly_0821_release~7541^2~1238 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ca14f0481bc8653c39e7b2fca81bc5131ac9afa8;p=firefly-linux-kernel-4.4.55.git efivars: fix warnings when CONFIG_PSTORE=n commit b728a5c806fb36f9adebf2a862bbd015e074afca upstream. drivers/firmware/efivars.c:161: warning: ‘utf16_strlen’ defined but not used utf16_strlen() is only used inside CONFIG_PSTORE - make this "static inline" to shut the compiler up [thanks to hpa for the suggestion]. drivers/firmware/efivars.c:602: warning: initialization from incompatible pointer type Between v1 and v2 of this patch series we decided to make the "part" number unsigned - but missed fixing the stub version of efi_pstore_write() Acked-by: Matthew Garrett Acked-by: Mike Waychison Signed-off-by: Tony Luck [took the static part of the patch, not the pstore part, for 3.0-stable, to fix the compiler warning we had - gregkh] Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 0ba8d69dd6c9..d5106c0f46cb 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c @@ -150,7 +150,7 @@ utf16_strnlen(efi_char16_t *s, size_t maxlength) return length; } -static unsigned long +static inline unsigned long utf16_strlen(efi_char16_t *s) { return utf16_strnlen(s, ~0UL);