On Wed, 2020-12-09 at 13:58 +0100, Matthias Brugger wrote: [...] > > + > > + /* switch to that node */ > > + parent = of_get_parent(dev); > > + if (!parent) { > > + printf("Found dma-ranges in root node, shoudln't happen\n"); > > + ret = -EINVAL; > > + goto out; > > + } > > Aren't we missing a of_node_put(parent) here?
Yes, that's right. > > + > > + /* Get the address sizes both for the bus and its parent */ > > + of_match_bus(dev)->count_cells(dev, &na, &ns); > > of_bus = of_match_bus(dev); > of_bus->count_cells(...) OK [...] > > diff --git a/drivers/core/read.c b/drivers/core/read.c > > index 076125824c..b835e82be9 100644 > > --- a/drivers/core/read.c > > +++ b/drivers/core/read.c > > @@ -338,6 +338,11 @@ u64 dev_translate_dma_address(const struct udevice > > *dev, const fdt32_t *in_addr) > > return ofnode_translate_dma_address(dev_ofnode(dev), in_addr); > > } > > > > > > +u64 dev_translate_cpu_address(const struct udevice *dev, const fdt32_t > > *in_addr) > > +{ > > + return ofnode_translate_cpu_address(dev_ofnode(dev), in_addr); > > +} > > + > > Dead code, please delete. Yes, sorry for that. Regards, Nicolas
signature.asc
Description: This is a digitally signed message part