All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: linux-kernel@vger.kernel.org
Cc: "Mike Waychison" <mikew@google.com>, "Matthew Garrett" <mjg@redhat.com>
Subject: [PATCH] efivars: fix warnings when CONFIG_PSTORE=n
Date: Tue, 02 Aug 2011 13:57:06 -0700	[thread overview]
Message-ID: <4e3864a227625bd7d6@agluck-desktop.sc.intel.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

drivers/firmware/efivars.c:161: warning: ‘utf16_strlen’ defined but not used
utf16_strlen() is only used inside CONFIG_PSTORE - put same #ifdef around the
definition of the function too.

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()

Signed-off-by: Tony Luck <tony.luck@intel.com>

---

diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index eacb05e..5315c1e 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -157,11 +157,13 @@ utf16_strnlen(efi_char16_t *s, size_t maxlength)
 	return length;
 }
 
+#ifdef CONFIG_PSTORE
 static unsigned long
 utf16_strlen(efi_char16_t *s)
 {
 	return utf16_strnlen(s, ~0UL);
 }
+#endif
 
 /*
  * Return the number of bytes is the length of this string
@@ -580,8 +582,8 @@ static ssize_t efi_pstore_read(u64 *id, enum pstore_type_id *type,
 	return -1;
 }
 
-static u64 efi_pstore_write(enum pstore_type_id type, int part, size_t size,
-			    struct pstore_info *psi)
+static u64 efi_pstore_write(enum pstore_type_id type, unsigned int part,
+			    size_t size, struct pstore_info *psi)
 {
 	return 0;
 }

             reply	other threads:[~2011-08-02 20:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 20:57 Luck, Tony [this message]
2011-08-02 21:03 ` [PATCH] efivars: fix warnings when CONFIG_PSTORE=n Matthew Garrett
2011-08-02 22:01   ` Mike Waychison
2011-08-02 21:05 ` H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4e3864a227625bd7d6@agluck-desktop.sc.intel.com \
    --to=tony.luck@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikew@google.com \
    --cc=mjg@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.