mtd: fix warnings due to 64-bit partition support
PATCH 1/1 mtd: fix warnings due to 64-bit partition support
commit 39ac34473f3c96e77cbe03a49141771ed1639486 ("cmd_mtdparts: use 64 bits for flash size, partition size & offset") introduced warnings in a couple places due to printf formats or pointer casting.
This patch fixes the warnings pointed out here:
http://lists.denx.de/pipermail/u-boot/2013-October/164981.html
---
Alternatively, given the imminent release, perhaps all but the first patch of my recent NAND pull request should be reverted. The first patch was a regression fix, but on a second look the remaining patches look more like enabling a new feature (and I didn't look too closely at the ubi patches because Stefan had acked them and asked me to apply; patch 4 is clearly not a bugfix).
I'm not sure why I didn't catch these warnings as I did run a makeall on arm and ppc. The only thing I can guess is that I forgot to check the ppc results, or I missed them among other pre-existing warnings such as the "AltiVec not supported in this target" warnings I get from 86xx builds.
--- common/fdt_support.c | 4 ++-- fs/cramfs/cramfs.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-)
common/fdt_support.c +2 -2
@@ -766,11 +766,11 @@ int fdt_node_set_part_info(void *blob, int parent_offset, part = list_entry(pentry, struct part_info, link); -debug ("%2d: %-20s0x%08x\t0x%08x\t%d\n" , +debug ("%2d: %-20s0x%08llx\t0x%08llx\t%d\n" , part_num, part->name, part->size, part->offset, part->mask_flags); -sprintf (buf,"partition@%x" , part->offset); +sprintf (buf,"partition@%llx" , part->offset); add_sub: ret =fdt_add_subnode (blob, parent_offset, buf);if (ret == -FDT_ERR_NOSPACE ) {
fs/cramfs/cramfs.c +3 -2
@@ -43,9 +43,10 @@ struct cramfs_super super;* device address space offset, so we need to shift it by a device start address. */ #if !defined(CONFIG_SYS_NO_FLASH )extern flash_info_t flash_info[]; -#define PART_OFFSET (x) (x->offset + flash_info[x->dev->id->num].start[0]) +#define PART_OFFSET (x) ((ulong)x->offset + \ + flash_info[x->dev->id->num].start[0])#else -#define PART_OFFSET (x) (x->offset) +#define PART_OFFSET (x) ((ulong)x->offset)#endif static int cramfs_read_super (struct part_info *info)
Signature · 1 line
1.8.1.2
Quoted 4 lines · Scott Wood
commit
39ac34473f3c96e77cbe03a49141771ed1639486("cmd_mtdparts: use 64 bits for flash size, partition size & offset") introduced warnings in a couple places due to printf formats or pointer casting.
Quoted 8 lines
This patch fixes the warnings pointed out here:
http://lists.denx.de/pipermail/u-boot/2013-October/164981.htmlSigned-off-by Scott Wood <[email protected]>Cc York Sun <[email protected]>Cc Stefan Roese <[email protected]>Cc Paul Burton <[email protected]>Cc Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20131015/2db87cdb/attachment.pgp>
PATCH 1/1 mtd: fix warnings due to 64-bit partition support
In reply to Scott WoodHi Scott,
Quoted 4 lines · Scott Wood
commit
39ac34473f3c96e77cbe03a49141771ed1639486("cmd_mtdparts: use 64 bits for flash size, partition size & offset") introduced warnings in a couple places due to printf formats or pointer casting.
Quoted 8 lines
This patch fixes the warnings pointed out here:
http://lists.denx.de/pipermail/u-boot/2013-October/164981.htmlSigned-off-by Scott Wood <[email protected]>Cc York Sun <[email protected]>Cc Stefan Roese <[email protected]>Cc Paul Burton <[email protected]>Cc Tom Rini <[email protected]>
Quoted 7 lines
---
Alternatively, given the imminent release, perhaps all but the first patch of my recent NAND pull request should be reverted. The first patch was a regression fix, but on a second look the remaining patches look more like enabling a new feature (and I didn't look too closely at the ubi patches because Stefan had acked them and asked me to apply; patch 4 is clearly not a bugfix).
Yes. But the first version of this patchset was posted before the merge window was closed (on the 6th of August). So they should be integrated in this release. That was my reasoning.
Thanks,
Stefan
PATCH 1/1 mtd: fix warnings due to 64-bit partition support
Quoted 26 lines · Stefan Roese
Hi Scott,
Quoted 4 lines · Scott Wood
commit
39ac34473f3c96e77cbe03a49141771ed1639486("cmd_mtdparts: use 64 bits for flash size, partition size & offset") introduced warnings in a couple places due to printf formats or pointer casting.Quoted 8 lines
This patch fixes the warnings pointed out here:
http://lists.denx.de/pipermail/u-boot/2013-October/164981.htmlSigned-off-by Scott Wood <[email protected]>Cc York Sun <[email protected]>Cc Stefan Roese <[email protected]>Cc Paul Burton <[email protected]>Cc Tom Rini <[email protected]>Acked-by Stefan Roese <[email protected]>Quoted 7 lines
---
Alternatively, given the imminent release, perhaps all but the first patch of my recent NAND pull request should be reverted. The first patch was a regression fix, but on a second look the remaining patches look more like enabling a new feature (and I didn't look too closely at the ubi patches because Stefan had acked them and asked me to apply; patch 4 is clearly not a bugfix).
Quoted 7 lines
Yes. But the first version of this patchset was posted before the merge window was closed (on the 6th of August). So they should be integrated in this release. That was my reasoning.
Thanks,
Stefan
Thanks for catching & fixing this guys :)
I'll make sure to build all boards when touching non-board-specific code in future!
Paul