Message ID | 20190806013723.4047-6-alistair@popple.id.au |
---|---|
State | Superseded |
Headers | show |
Series | Split backends from system description | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch master (3a46123baa267a1bc6e03c50449a42e8d321bf86) |
snowpatch_ozlabs/build-multiarch | fail | Test build-multiarch on branch master |
We definitely need to make most functions take arguments and not use globals. :-) Reviewed-by: Amitay Isaacs <amitay@ozlabs.org> On Tue, 2019-08-06 at 11:37 +1000, Alistair Popple wrote: > Signed-off-by: Alistair Popple <alistair@popple.id.au> > --- > libpdbg/device.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libpdbg/device.c b/libpdbg/device.c > index 07f373d..2fcb184 100644 > --- a/libpdbg/device.c > +++ b/libpdbg/device.c > @@ -574,11 +574,11 @@ static int dt_expand_node(struct pdbg_target > *node, const void *fdt, int fdt_nod > return nextoffset; > } > > -static void dt_expand(const void *fdt) > +static void dt_expand(void *root, const void *fdt) > { > PR_DEBUG("FDT: Parsing fdt @%p\n", fdt); > > - if (dt_expand_node(pdbg_dt_root, fdt, 0) < 0) > + if (dt_expand_node(root, fdt, 0) < 0) > abort(); > } > > @@ -634,7 +634,7 @@ void pdbg_targets_init(void *fdt) > return; > } > > - dt_expand(fdt); > + dt_expand(pdbg_dt_root, fdt); > } > > char *pdbg_target_path(const struct pdbg_target *target) > -- > 2.20.1 > Amitay.
diff --git a/libpdbg/device.c b/libpdbg/device.c index 07f373d..2fcb184 100644 --- a/libpdbg/device.c +++ b/libpdbg/device.c @@ -574,11 +574,11 @@ static int dt_expand_node(struct pdbg_target *node, const void *fdt, int fdt_nod return nextoffset; } -static void dt_expand(const void *fdt) +static void dt_expand(void *root, const void *fdt) { PR_DEBUG("FDT: Parsing fdt @%p\n", fdt); - if (dt_expand_node(pdbg_dt_root, fdt, 0) < 0) + if (dt_expand_node(root, fdt, 0) < 0) abort(); } @@ -634,7 +634,7 @@ void pdbg_targets_init(void *fdt) return; } - dt_expand(fdt); + dt_expand(pdbg_dt_root, fdt); } char *pdbg_target_path(const struct pdbg_target *target)
Signed-off-by: Alistair Popple <alistair@popple.id.au> --- libpdbg/device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)