diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-07-10 11:59:59 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-07-10 11:59:59 +0200 |
commit | e1bcad609f5a533da45fac071cf0849b86dbab92 (patch) | |
tree | bc77cb21c81c053b99271c7bac9f6bc071cc56a6 /scripts/dtc/treesource.c | |
parent | c935cd62d3fe985d7f0ebea185d2759e8992e96f (diff) | |
parent | b037b09b9058d84882fa2c4db3806433e2b0f912 (diff) |
Merge branch 'tip/x86/entry'
Diffstat (limited to 'scripts/dtc/treesource.c')
-rw-r--r-- | scripts/dtc/treesource.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/dtc/treesource.c b/scripts/dtc/treesource.c index c9d980c8abfc..061ba8c9c5e8 100644 --- a/scripts/dtc/treesource.c +++ b/scripts/dtc/treesource.c @@ -110,13 +110,13 @@ static void write_propval_int(FILE *f, const char *p, size_t len, size_t width) fprintf(f, "%02"PRIx8, *(const uint8_t*)p); break; case 2: - fprintf(f, "0x%02"PRIx16, fdt16_to_cpu(*(const fdt16_t*)p)); + fprintf(f, "0x%02"PRIx16, dtb_ld16(p)); break; case 4: - fprintf(f, "0x%02"PRIx32, fdt32_to_cpu(*(const fdt32_t*)p)); + fprintf(f, "0x%02"PRIx32, dtb_ld32(p)); break; case 8: - fprintf(f, "0x%02"PRIx64, fdt64_to_cpu(*(const fdt64_t*)p)); + fprintf(f, "0x%02"PRIx64, dtb_ld64(p)); break; } if (p + width < end) @@ -183,7 +183,7 @@ static enum markertype guess_value_type(struct property *prop) nnotcelllbl++; } - if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul < (len-nnul)) + if ((p[len-1] == '\0') && (nnotstring == 0) && (nnul <= (len-nnul)) && (nnotstringlbl == 0)) { return TYPE_STRING; } else if (((len % sizeof(cell_t)) == 0) && (nnotcelllbl == 0)) { |