[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130220125943.df50cc67.akpm@linux-foundation.org>
Date: Wed, 20 Feb 2013 12:59:43 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Peter Jones <pjones@...hat.com>
Cc: Fabio Estevam <festevam@...il.com>, sfr@...b.auug.org.au,
linux-kernel@...r.kernel.org,
Fabio Estevam <fabio.estevam@...escale.com>,
Matt Fleming <matt.fleming@...el.com>,
Jens Axboe <axboe@...nel.dk>
Subject: Re: [PATCH] block: partitions: efi: Typecast sizeof(gpt_header)
On Wed, 20 Feb 2013 11:27:48 -0500
Peter Jones <pjones@...hat.com> wrote:
> On Wed, Feb 20, 2013 at 11:52:10AM -0300, Fabio Estevam wrote:
> > From: Fabio Estevam <fabio.estevam@...escale.com>
> >
> > Since commit ef25bb0fa6e2 (block/partitions/efi.c: ensure that the GPT header is
> > at least the size of the structure.) , when building for a 32-bit architecture,
> > such as ARM, the following build warning is seen:
> >
> > block/partitions/efi.c:324:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat]
>
> Hi Fabio,
>
> I sent and updated version of ef25bb0fa6e2 this morning to fix this
> issue. Thanks for the patch, though. Andrew, if you'd like you can
> just use this instead of replacing my patch with the new one.
You're both wrong ;) Print a size_t with %z:
--- a/block/partitions/efi.c~ensure-that-the-gpt-header-is-at-least-the-size-of-the-structure-fix
+++ a/block/partitions/efi.c
@@ -321,7 +321,7 @@ static int is_gpt_valid(struct parsed_pa
/* Check the GUID Partition Table header size is too small */
if (le32_to_cpu((*gpt)->header_size) < sizeof(gpt_header)) {
- pr_debug("GUID Partition Table Header size is too small: %u < %lu\n",
+ pr_debug("GUID Partition Table Header size is too small: %u < %zu\n",
le32_to_cpu((*gpt)->header_size),
sizeof(gpt_header));
goto fail;
_
--
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