Re: [PATCH] commands/of_property: add option to apply changes as fixup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 25, 2018 at 08:23:58AM +0000, Baeuerle, Florian wrote:
> Hi Sascha,
> 
> Thanks for the review!
> 
> I've got one more question (below).
> 
> Am Freitag, den 25.05.2018, 09:11 +0200 schrieb Sascha Hauer:
> > HI Florian,
> > 
> > looks good generally. Some small comments below.
> > 
> > On Thu, May 24, 2018 at 02:48:47PM +0000, Baeuerle, Florian wrote:
> > > +static int of_fixup_property_set(struct device_node *root, void *context)
> > > +{
> > > +	const struct of_fixup_property_data *fixup = context;
> > > +	int ret = do_of_property_set_now(root, fixup->path, fixup->propname,
> > > +			fixup->data, fixup->len);
> > > +
> > > +	free(fixup->path);
> > > +	free(fixup->propname);
> > > +	free(fixup->data);
> > 
> > Don't free here. A fixup can be called multiple times.
> 
> It looks like I should not free at all (of_fixup_status neither does).
> Can you confirm that?

Yes.

Freeing should be done at of_unregister_fixup time, but that doesn't
exist (yet).

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux