diff options
author | Tom Rini <trini@konsulko.com> | 2020-06-19 16:25:50 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-19 16:25:50 -0400 |
commit | 5575f79bdaa824a90747d5a3d063b5219521b066 (patch) | |
tree | 6f25a65e9044c48192caa224936207fe1e510e81 /lib | |
parent | 04909251fdecac9d05e527b83e86e043e8df00ea (diff) | |
parent | 2a2b94a9d9a3139853c6ccd911c55db77b714a68 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-spi into next
- Convert fsl_espi to driver model (Chuanhua)
- Enable am335x baltos to DM_SPI (Jagan)
- Drop few powerpc board which doesn't have DM enabled (Jagan)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_image_loader.c | 2 | ||||
-rw-r--r-- | lib/optee/optee.c | 7 | ||||
-rw-r--r-- | lib/strto.c | 18 |
3 files changed, 5 insertions, 22 deletions
diff --git a/lib/efi_loader/efi_image_loader.c b/lib/efi_loader/efi_image_loader.c index 478aaf50d3..230d41ae5e 100644 --- a/lib/efi_loader/efi_image_loader.c +++ b/lib/efi_loader/efi_image_loader.c @@ -369,7 +369,7 @@ bool efi_image_parse(void *efi, size_t len, struct efi_image_regions **regp, /* 3. Extra data excluding Certificates Table */ if (bytes_hashed + authsz < len) { - debug("extra data for hash: %lu\n", + debug("extra data for hash: %zu\n", len - (bytes_hashed + authsz)); efi_image_region_add(regs, efi + bytes_hashed, efi + len - authsz, 0); diff --git a/lib/optee/optee.c b/lib/optee/optee.c index e59b5766e7..457d4cca8a 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -156,8 +156,9 @@ int optee_copy_fdt_nodes(const void *old_blob, void *new_blob) /* optee inserts its memory regions as reserved-memory nodes */ nodeoffset = fdt_subnode_offset(old_blob, 0, "reserved-memory"); if (nodeoffset >= 0) { - subnode = fdt_first_subnode(old_blob, nodeoffset); - while (subnode >= 0) { + for (subnode = fdt_first_subnode(old_blob, nodeoffset); + subnode >= 0; + subnode = fdt_next_subnode(old_blob, subnode)) { const char *name = fdt_get_name(old_blob, subnode, NULL); if (!name) @@ -197,8 +198,6 @@ int optee_copy_fdt_nodes(const void *old_blob, void *new_blob) if (ret < 0) return ret; } - - subnode = fdt_next_subnode(old_blob, subnode); } } diff --git a/lib/strto.c b/lib/strto.c index 3d77115d4d..c00bb5895d 100644 --- a/lib/strto.c +++ b/lib/strto.c @@ -22,25 +22,9 @@ static const char *_parse_integer_fixup_radix(const char *s, unsigned int *base) *base = 16; else *base = 8; - } else { - int i = 0; - char var; - + } else *base = 10; - - do { - var = tolower(s[i++]); - if (var >= 'a' && var <= 'f') { - *base = 16; - break; - } - - if (!(var >= '0' && var <= '9')) - break; - } while (var); - } } - if (*base == 16 && s[0] == '0' && tolower(s[1]) == 'x') s += 2; return s; |