mirror of
https://github.com/dgibson/dtc.git
synced 2026-04-12 00:47:46 -04:00
Mirror of DTC
The fdt_set_header() macro casts an arbitrary pointer into (struct fdt_header *) to set fdt header fields. While we need to change the type, so that we can use this macro on the usual (void *) used to represent a device tree blob, the current macro also casts away any const on the input pointer, which loses an important check. This patch replaces the fdt_set_header() macro with a set of inline functions, one for each header field which do a similar thing, but which won't silently remove const from a given pointer. This approach is also more in keeping with the individual accessor macros we use for reading fdt header fields. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> |
||
|---|---|---|
| Documentation | ||
| libfdt | ||
| scripts | ||
| tests | ||
| .gitignore | ||
| comment-test.dts | ||
| data.c | ||
| dtc-lexer.l | ||
| dtc-parser.y | ||
| dtc.c | ||
| dtc.h | ||
| flattree.c | ||
| fstree.c | ||
| ftdump.c | ||
| GPL | ||
| livetree.c | ||
| Makefile | ||
| Makefile.dtc | ||
| srcpos.c | ||
| srcpos.h | ||
| TODO | ||
| treesource.c | ||