mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Tweak code to display cell values
Move the division out of the loop; this seems slightly cleaner. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
dfcfb7f169
commit
c78ca72e1e
1 changed files with 3 additions and 3 deletions
6
util.c
6
util.c
|
@ -371,9 +371,9 @@ void utilfdt_print_data(const char *data, int len)
|
|||
const uint32_t *cell = (const uint32_t *)data;
|
||||
|
||||
printf(" = <");
|
||||
for (i = 0; i < len; i += 4)
|
||||
printf("0x%08x%s", fdt32_to_cpu(cell[i / 4]),
|
||||
i < (len - 4) ? " " : "");
|
||||
for (i = 0, len /= 4; i < len; i++)
|
||||
printf("0x%08x%s", fdt32_to_cpu(cell[i]),
|
||||
i < (len - 1) ? " " : "");
|
||||
printf(">");
|
||||
} else {
|
||||
printf(" = [");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue