From: "Jan Lübbe" <jlu@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Alexander Aring <alex.aring@googlemail.com>
Subject: Re: [PATCH 1/2] mtd: fix compiler warnings
Date: Wed, 05 Sep 2012 17:25:24 +0200 [thread overview]
Message-ID: <1346858724.3388.24.camel@coredoba.hi.pengutronix.de> (raw)
In-Reply-To: <1346651881-3765-1-git-send-email-alex.aring@gmail.com>
Hi,
On Mon, 2012-09-03 at 07:58 +0200, Alexander Aring wrote:
> Fix some compiler warnings.
> --- a/drivers/mtd/core.c
> +++ b/drivers/mtd/core.c
> @@ -79,7 +79,7 @@ static ssize_t mtd_write(struct cdev* cdev, const void *buf, size_t _count,
> return -EINVAL;
> }
>
> - dev_dbg(cdev->dev, "write: 0x%08lx 0x%08x\n", offset, count);
> + dev_dbg(cdev->dev, "write: 0x%08lx 0x%08lx\n", offset, count);
> while (count) {
This causes some new warnings for me:
drivers/mtd/core.c: In function 'mtd_write':
drivers/mtd/core.c:82:2: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'size_t'
drivers/mtd/core.c:102:4: warning: format '%08lx' expects type 'long unsigned int', but argument 5 has type 'size_t'
drivers/mtd/core.c:102:4: warning: format '%08lx' expects type 'long unsigned int', but argument 6 has type 'size_t'
They go away when reverting this. It seems that different achitectures
have different ideas about size_t:
./include/linux/types.h:54:typedef __kernel_size_t size_t;
./arch/ppc/include/asm/posix_types.h:17:typedef unsigned int __kernel_size_t;
./arch/blackfin/include/asm/posix_types.h:45:typedef unsigned int __kernel_size_t;
./arch/mips/include/asm/posix_types.h:34:typedef unsigned int __kernel_size_t;
./arch/mips/include/asm/posix_types.h:39:typedef unsigned long __kernel_size_t;
./arch/x86/include/asm/posix_types.h:34:typedef unsigned int __kernel_size_t;
./arch/sandbox/include/asm/posix_types.h:18:typedef unsigned long __kernel_size_t;
./arch/nios2/include/asm/posix_types.h:30:typedef unsigned int __kernel_size_t;
./arch/openrisc/include/asm/posix_types.h:28:typedef unsigned int __kernel_size_t;
./arch/arm/include/asm/posix_types.h:30:typedef unsigned int __kernel_size_t;
On which arch did you see the warnings with the original code?
Regards,
Jan
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-09-05 15:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-03 5:58 Alexander Aring
2012-09-03 5:58 ` [PATCH 2/2] mtd: add private data to mtddev-hook Alexander Aring
2012-09-03 9:06 ` [PATCH 1/2] mtd: fix compiler warnings Sascha Hauer
2012-09-05 15:25 ` Jan Lübbe [this message]
2012-09-05 18:53 ` Alexander Aring
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=1346858724.3388.24.camel@coredoba.hi.pengutronix.de \
--to=jlu@pengutronix.de \
--cc=alex.aring@googlemail.com \
--cc=barebox@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox