* [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
@ 2016-07-22 15:22 ` Simon Glass
2016-07-22 22:04 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox Simon Glass
` (4 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Simon Glass @ 2016-07-22 15:22 UTC (permalink / raw)
To: u-boot
With sandbox on 32-bit the size_t type can be a little inconsistent. Use
the same type as the caller expects to avoid a compiler warning.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
cmd/lzmadec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cmd/lzmadec.c b/cmd/lzmadec.c
index 1ad9ed6..c78df82 100644
--- a/cmd/lzmadec.c
+++ b/cmd/lzmadec.c
@@ -20,7 +20,7 @@
static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
{
unsigned long src, dst;
- unsigned long src_len = ~0UL, dst_len = ~0UL;
+ SizeT src_len = ~0UL, dst_len = ~0UL;
int ret;
switch (argc) {
@@ -40,7 +40,8 @@ static int do_lzmadec(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
if (ret != SZ_OK)
return 1;
- printf("Uncompressed size: %ld = 0x%lX\n", src_len, src_len);
+ printf("Uncompressed size: %ld = %#lX\n", (ulong)src_len,
+ (ulong)src_len);
setenv_hex("filesize", src_len);
return 0;
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call
2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
@ 2016-07-22 22:04 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-22 22:04 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:46AM -0600, Simon Glass wrote:
> With sandbox on 32-bit the size_t type can be a little inconsistent. Use
> the same type as the caller expects to avoid a compiler warning.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160722/8bad12e0/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [U-Boot, 2/5] lzmadec: Use the same type as the lzma call
2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
2016-07-22 22:04 ` Tom Rini
@ 2016-07-26 2:32 ` Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-26 2:32 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:46AM -0600, Simon Glass wrote:
> With sandbox on 32-bit the size_t type can be a little inconsistent. Use
> the same type as the caller expects to avoid a compiler warning.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/4ba51b37/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
@ 2016-07-22 15:22 ` Simon Glass
2016-07-22 22:05 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 4/5] hashtable: " Simon Glass
` (3 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Simon Glass @ 2016-07-22 15:22 UTC (permalink / raw)
To: u-boot
This fixes a mismatch between the %zu format and the type used on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
disk/part_efi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 0af1e92..01f71be 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -886,9 +886,10 @@ static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc,
count = le32_to_cpu(pgpt_head->num_partition_entries) *
le32_to_cpu(pgpt_head->sizeof_partition_entry);
- debug("%s: count = %u * %u = %zu\n", __func__,
+ debug("%s: count = %u * %u = %lu\n", __func__,
(u32) le32_to_cpu(pgpt_head->num_partition_entries),
- (u32) le32_to_cpu(pgpt_head->sizeof_partition_entry), count);
+ (u32) le32_to_cpu(pgpt_head->sizeof_partition_entry),
+ (ulong)count);
/* Allocate memory for PTE, remember to FREE */
if (count != 0) {
@@ -897,9 +898,8 @@ static gpt_entry *alloc_read_gpt_entries(struct blk_desc *dev_desc,
}
if (count == 0 || pte == NULL) {
- printf("%s: ERROR: Can't allocate 0x%zX "
- "bytes for GPT Entries\n",
- __func__, count);
+ printf("%s: ERROR: Can't allocate %#lX bytes for GPT Entries\n",
+ __func__, (ulong)count);
return NULL;
}
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox
2016-07-22 15:22 ` [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox Simon Glass
@ 2016-07-22 22:05 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-22 22:05 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:47AM -0600, Simon Glass wrote:
> This fixes a mismatch between the %zu format and the type used on sandbox.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160722/937f7415/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [U-Boot, 3/5] part_efi: Fix compiler warning on 32-bit sandbox
2016-07-22 15:22 ` [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox Simon Glass
2016-07-22 22:05 ` Tom Rini
@ 2016-07-26 2:32 ` Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-26 2:32 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:47AM -0600, Simon Glass wrote:
> This fixes a mismatch between the %zu format and the type used on sandbox.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/78f9e95b/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 4/5] hashtable: Fix compiler warning on 32-bit sandbox
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
2016-07-22 15:22 ` [U-Boot] [PATCH 2/5] lzmadec: Use the same type as the lzma call Simon Glass
2016-07-22 15:22 ` [U-Boot] [PATCH 3/5] part_efi: Fix compiler warning on 32-bit sandbox Simon Glass
@ 2016-07-22 15:22 ` Simon Glass
2016-07-22 22:05 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 15:22 ` [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback Simon Glass
` (2 subsequent siblings)
5 siblings, 2 replies; 15+ messages in thread
From: Simon Glass @ 2016-07-22 15:22 UTC (permalink / raw)
To: u-boot
This fixes a mismatch between the %zu format and the type used on sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
lib/hashtable.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/hashtable.c b/lib/hashtable.c
index 435e2a6..4e52b36 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -602,8 +602,8 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
return (-1);
}
- debug("EXPORT table = %p, htab.size = %d, htab.filled = %d, "
- "size = %zu\n", htab, htab->size, htab->filled, size);
+ debug("EXPORT table = %p, htab.size = %d, htab.filled = %d, size = %lu\n",
+ htab, htab->size, htab->filled, (ulong)size);
/*
* Pass 1:
* search used entries,
@@ -657,8 +657,8 @@ ssize_t hexport_r(struct hsearch_data *htab, const char sep, int flag,
/* Check if the user supplied buffer size is sufficient */
if (size) {
if (size < totlen + 1) { /* provided buffer too small */
- printf("Env export buffer too small: %zu, "
- "but need %zu\n", size, totlen + 1);
+ printf("Env export buffer too small: %lu, but need %lu\n",
+ (ulong)size, (ulong)totlen + 1);
__set_errno(ENOMEM);
return (-1);
}
@@ -790,7 +790,7 @@ int himport_r(struct hsearch_data *htab,
/* we allocate new space to make sure we can write to the array */
if ((data = malloc(size + 1)) == NULL) {
- debug("himport_r: can't malloc %zu bytes\n", size + 1);
+ debug("himport_r: can't malloc %lu bytes\n", (ulong)size + 1);
__set_errno(ENOMEM);
return 0;
}
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 4/5] hashtable: Fix compiler warning on 32-bit sandbox
2016-07-22 15:22 ` [U-Boot] [PATCH 4/5] hashtable: " Simon Glass
@ 2016-07-22 22:05 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-22 22:05 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:48AM -0600, Simon Glass wrote:
> This fixes a mismatch between the %zu format and the type used on sandbox.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160722/6718e941/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [U-Boot, 4/5] hashtable: Fix compiler warning on 32-bit sandbox
2016-07-22 15:22 ` [U-Boot] [PATCH 4/5] hashtable: " Simon Glass
2016-07-22 22:05 ` Tom Rini
@ 2016-07-26 2:32 ` Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-26 2:32 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:48AM -0600, Simon Glass wrote:
> This fixes a mismatch between the %zu format and the type used on sandbox.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/454f3ca2/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
` (2 preceding siblings ...)
2016-07-22 15:22 ` [U-Boot] [PATCH 4/5] hashtable: " Simon Glass
@ 2016-07-22 15:22 ` Simon Glass
2016-07-22 22:05 ` Tom Rini
2016-07-26 2:33 ` [U-Boot] [U-Boot, " Tom Rini
2016-07-22 22:04 ` [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
5 siblings, 2 replies; 15+ messages in thread
From: Simon Glass @ 2016-07-22 15:22 UTC (permalink / raw)
To: u-boot
This code does not match the fdt version in fdt.py. When dtoc is unable to
use the Python libfdt library, it uses the fallback version, which does not
widen arrays correctly.
Fix this to avoid a warning 'excess elements in array initialize' in
dt-platdata.c which happens on some platforms.
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
tools/dtoc/fdt_fallback.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/dtoc/fdt_fallback.py b/tools/dtoc/fdt_fallback.py
index 14decf3..9ed11e4 100644
--- a/tools/dtoc/fdt_fallback.py
+++ b/tools/dtoc/fdt_fallback.py
@@ -71,6 +71,12 @@ class Prop:
if type(newprop.value) == list and type(self.value) != list:
self.value = newprop.value
+ if type(self.value) == list and len(newprop.value) > len(self.value):
+ val = fdt_util.GetEmpty(self.type)
+ while len(self.value) < len(newprop.value):
+ self.value.append(val)
+
+
class Node:
"""A device tree node
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 15+ messages in thread* [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback
2016-07-22 15:22 ` [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback Simon Glass
@ 2016-07-22 22:05 ` Tom Rini
2016-07-26 2:33 ` [U-Boot] [U-Boot, " Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-22 22:05 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:49AM -0600, Simon Glass wrote:
> This code does not match the fdt version in fdt.py. When dtoc is unable to
> use the Python libfdt library, it uses the fallback version, which does not
> widen arrays correctly.
>
> Fix this to avoid a warning 'excess elements in array initialize' in
> dt-platdata.c which happens on some platforms.
>
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160722/3719ea98/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [U-Boot, 5/5] dtoc: Correct the type widening code in fdt_fallback
2016-07-22 15:22 ` [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback Simon Glass
2016-07-22 22:05 ` Tom Rini
@ 2016-07-26 2:33 ` Tom Rini
1 sibling, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-26 2:33 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:49AM -0600, Simon Glass wrote:
> This code does not match the fdt version in fdt.py. When dtoc is unable to
> use the Python libfdt library, it uses the fallback version, which does not
> widen arrays correctly.
>
> Fix this to avoid a warning 'excess elements in array initialize' in
> dt-platdata.c which happens on some platforms.
>
> Reported-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Tested-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/9e6bf2d4/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
` (3 preceding siblings ...)
2016-07-22 15:22 ` [U-Boot] [PATCH 5/5] dtoc: Correct the type widening code in fdt_fallback Simon Glass
@ 2016-07-22 22:04 ` Tom Rini
2016-07-26 2:32 ` [U-Boot] [U-Boot, " Tom Rini
5 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-22 22:04 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:45AM -0600, Simon Glass wrote:
> Sandbox is built with 64-bit ints by default. This doesn't work properly on
> 32-bit machines.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160722/308812c3/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread* [U-Boot] [U-Boot, 1/5] sandbox: Add instructions about building on 32-bit machines
2016-07-22 15:22 [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Simon Glass
` (4 preceding siblings ...)
2016-07-22 22:04 ` [U-Boot] [PATCH 1/5] sandbox: Add instructions about building on 32-bit machines Tom Rini
@ 2016-07-26 2:32 ` Tom Rini
5 siblings, 0 replies; 15+ messages in thread
From: Tom Rini @ 2016-07-26 2:32 UTC (permalink / raw)
To: u-boot
On Fri, Jul 22, 2016 at 09:22:45AM -0600, Simon Glass wrote:
> Sandbox is built with 64-bit ints by default. This doesn't work properly on
> 32-bit machines.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160725/6b8c7d40/attachment.sig>
^ permalink raw reply [flat|nested] 15+ messages in thread