[PATCH -next] efivars: fix build warning when PSTORE is not enabled

From: Randy Dunlap
Date: Wed Aug 03 2011 - 21:15:35 EST


On Thu, 4 Aug 2011 10:49:27 +1000 Stephen Rothwell wrote:

> Hi Randy,
>
> On Wed, 3 Aug 2011 10:40:30 -0700 Randy Dunlap <rdunlap@xxxxxxxxxxxx> wrote:
> >
> > What is this warning about? I don't see the problem.
> >
> > The warning only happens on i386 AFAIK. Must be some typedef glitch?
> >
> > drivers/firmware/efivars.c:602: warning: initialization from incompatible pointer type
>
> The second argument to the write method in a pstore_info is supposed to
> be "unsigned int" but the assigned function has "int" in the
> !CONFIG_PSTORE version.

Dang, I missed that second version of the write function. Thanks.

---
From: Randy Dunlap <rdunlap@xxxxxxxxxxxx>

Fix efivars.c build warning when CONFIG_PSTORE is not enabled:

drivers/firmware/efivars.c:602: warning: initialization from incompatible pointer type

Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
Cc: matthew.e.tolentino@xxxxxxxxx
---
drivers/firmware/efivars.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-next-20110803.orig/drivers/firmware/efivars.c
+++ linux-next-20110803/drivers/firmware/efivars.c
@@ -580,8 +580,8 @@ static ssize_t efi_pstore_read(u64 *id,
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;
}
--
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/