From: Alan <alan@lxorguk.ukuu.org.uk>
To: akpm@osdl.org, linux-kernel@vger.kernel.org, dwmw2@infradead.org
Subject: [PATCH] ubi: int versus size_t printk warnings
Date: Wed, 31 Jan 2007 17:02:57 +0000 [thread overview]
Message-ID: <20070131170257.79ca59b7@localhost.localdomain> (raw)
Another mtd driver, another set of 32bit assumptions. Please compile mtd
stuff on 64bit now and then, or if stuff is for 32bit only systems then
add the right CONFIG rules.
Signed-off-by: Alan Cox <alan@redhat.com>
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.20-rc6-mm3/drivers/mtd/ubi/io.c linux-2.6.20-rc6-mm3/drivers/mtd/ubi/io.c
--- linux.vanilla-2.6.20-rc6-mm3/drivers/mtd/ubi/io.c 2007-01-31 14:20:41.000000000 +0000
+++ linux-2.6.20-rc6-mm3/drivers/mtd/ubi/io.c 2007-01-31 15:24:50.142281168 +0000
@@ -129,8 +129,8 @@
yield();
goto retry;
}
- ubi_err("error %d while reading %d bytes from PEB %d:%d, "
- "read %d bytes", err, len, pnum, offset, *read);
+ ubi_err("error %d while reading %Zd bytes from PEB %d:%d, "
+ "read %Zd bytes", err, len, pnum, offset, *read);
dump_stack();
}
@@ -190,14 +190,14 @@
err = mtd_write(io, buf, pnum, offset, len, written);
if (unlikely(err)) {
- ubi_err("error %d while writing %d bytes to PEB %d:%d, written"
- " %d bytes", err, len, pnum, offset, *written);
+ ubi_err("error %d while writing %Zd bytes to PEB %d:%d, written"
+ " %Zd bytes", err, len, pnum, offset, *written);
dump_stack();
}
/* The below is just for debugging and is compiled out if disabled */
if (ubi_dbg_is_write_failure() && !err) {
- ubi_err("cannot write %d bytes to PEB %d:%d (emulated)",
+ ubi_err("cannot write %Zd bytes to PEB %d:%d (emulated)",
len, pnum, offset);
dump_stack();
return -EIO;
@@ -597,7 +597,7 @@
/* The shift must be aligned to 32-bit boundary */
if (io->vid_hdr_shift % 4) {
- ubi_err("unaligned VID header shift %d",
+ ubi_err("unaligned VID header shift %Zd",
io->vid_hdr_shift);
goto out_mtd;
}
@@ -615,7 +615,7 @@
io->leb_start < io->vid_hdr_offset + UBI_VID_HDR_SIZE ||
io->leb_start > io->peb_size - UBI_VID_HDR_SIZE ||
io->leb_start % io->min_io_size) {
- ubi_err("bad VID header (%d) or data offsets (%d)",
+ ubi_err("bad VID header (%Zd) or data offsets (%Zd)",
io->vid_hdr_offset, io->leb_start);
goto out_mtd;
}
@@ -847,12 +847,12 @@
goto bad;
}
if (unlikely(vid_hdr_offset != io->vid_hdr_offset)) {
- ubi_err("bad VID header offset %d at PEB %d, expected %d",
+ ubi_err("bad VID header offset %d at PEB %d, expected %Zd",
vid_hdr_offset, pnum, io->vid_hdr_offset);
goto bad;
}
if (unlikely(leb_start != io->leb_start)) {
- ubi_err("bad data offset %d at PEB %d, expected %d",
+ ubi_err("bad data offset %d at PEB %d, expected %Zd",
pnum, leb_start, io->leb_start);
goto bad;
}
next reply other threads:[~2007-01-31 16:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-31 17:02 Alan [this message]
2007-01-31 17:06 ` David Woodhouse
2007-02-01 7:19 ` Artem Bityutskiy
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=20070131170257.79ca59b7@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®