diff --git a/Documentation/devicetree/bindings/barebox/barebox,state.rst b/Documentation/devicetree/bindings/barebox/barebox,state.rst index d1b0627..d507657 100644 --- a/Documentation/devicetree/bindings/barebox/barebox,state.rst +++ b/Documentation/devicetree/bindings/barebox/barebox,state.rst @@ -43,7 +43,7 @@ These are subnodes of a state node each describing a single variable. The node name may end with ``@
``, but the suffix is -sripped from the variable name. +stripped from the variable name. State variables have a type. Currenty supported types are: ``uint8``, ``uint32``, ``enum32``, ``mac`` address or ``string``. Variable length diff --git a/commands/devinfo.c b/commands/devinfo.c index c78efcb..9d5e8b8 100644 --- a/commands/devinfo.c +++ b/commands/devinfo.c @@ -77,13 +77,15 @@ if (dev->num_resources) printf("Resources:\n"); for (i = 0; i < dev->num_resources; i++) { + resource_size_t size; res = &dev->resource[i]; + size = resource_size(res); printf(" num: %d\n", i); if (res->name) printf(" name: %s\n", res->name); - printf(" start: " PRINTF_CONVERSION_RESOURCE "\n" - " size: " PRINTF_CONVERSION_RESOURCE "\n", - res->start, resource_size(res)); + printf(" start: %pa\n" + " size: %pa\n", + &res->start, &size); } if (dev->driver) diff --git a/commands/iomemport.c b/commands/iomemport.c index 5294c13..6d97c57 100644 --- a/commands/iomemport.c +++ b/commands/iomemport.c @@ -22,14 +22,14 @@ static void __print_resources(struct resource *res, int indent) { struct resource *r; + resource_size_t size = resource_size(res); int i; for (i = 0; i < indent; i++) printf(" "); - printf(PRINTF_CONVERSION_RESOURCE " - " PRINTF_CONVERSION_RESOURCE - " (size " PRINTF_CONVERSION_RESOURCE ") %s\n", - res->start, res->end, resource_size(res), res->name); + printf("%pa - %pa (size %pa) %s\n", + &res->start, &res->end, &size, res->name); list_for_each_entry(r, &res->children, sibling) __print_resources(r, indent + 1); diff --git a/common/bootm.c b/common/bootm.c index 1199cb7..79833e0 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -246,7 +246,7 @@ printf(", multifile image %s", data->initrd_part); printf("\n"); done1: - printf("initrd is at " PRINTF_CONVERSION_RESOURCE "-" PRINTF_CONVERSION_RESOURCE "\n", + printf("initrd is at %pa-%pa\n", data->initrd_res->start, data->initrd_res->end); @@ -456,9 +456,9 @@ static void bootm_print_info(struct image_data *data) { if (data->os_res) - printf("OS image is at " PRINTF_CONVERSION_RESOURCE "-" PRINTF_CONVERSION_RESOURCE "\n", - data->os_res->start, - data->os_res->end); + printf("OS image is at %pa-%pa\n", + &data->os_res->start, + &data->os_res->end); else printf("OS image not yet relocated\n"); } diff --git a/common/hush.c b/common/hush.c index 832bc7b..d3f7bf3 100644 --- a/common/hush.c +++ b/common/hush.c @@ -863,29 +863,29 @@ if ((rpipe->r_mode == RES_IN || rpipe->r_mode == RES_FOR) && (rpipe->next == NULL)) { - syntax(); - return 1; + syntax(); + return 1; } if ((rpipe->r_mode == RES_IN && - (rpipe->next->r_mode == RES_IN && - rpipe->next->progs->argv != NULL))|| - (rpipe->r_mode == RES_FOR && - rpipe->next->r_mode != RES_IN)) { - syntax(); - return 1; + (rpipe->next->r_mode == RES_IN && + rpipe->next->progs->argv != NULL))|| + (rpipe->r_mode == RES_FOR && + rpipe->next->r_mode != RES_IN)) { + syntax(); + return 1; } } for (; pi; pi = (flag_restore != 0) ? rpipe : pi->next) { if (pi->r_mode == RES_WHILE || pi->r_mode == RES_UNTIL || - pi->r_mode == RES_FOR) { - /* check Ctrl-C */ - if (ctrlc()) - return 1; - flag_restore = 0; - if (!rpipe) { - flag_rep = 0; - rpipe = pi; - } + pi->r_mode == RES_FOR) { + /* check Ctrl-C */ + if (ctrlc()) + return 1; + flag_restore = 0; + if (!rpipe) { + flag_rep = 0; + rpipe = pi; + } } rmode = pi->r_mode; debug("rmode=%d if_code=%d next_if_code=%d skip_more=%d\n", diff --git a/common/uimage.c b/common/uimage.c index a7011a7..59d7b65 100644 --- a/common/uimage.c +++ b/common/uimage.c @@ -354,10 +354,9 @@ uimage_resource = request_sdram_region("uimage", start, size); if (!uimage_resource) { - printf("unable to request SDRAM " - PRINTF_CONVERSION_RESOURCE "-" - PRINTF_CONVERSION_RESOURCE "\n", - start, start + size - 1); + resource_size_t prsize = start + size - 1; + printf("unable to request SDRAM %pa - %pa\n", + &start, &prsize); return -ENOMEM; } } diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 27f4abc..908aacb 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -15,6 +15,7 @@ #include