[PATCH v3 5/5] powerpc/pseries: use of_property_alloc/free() and of_node_alloc()

Clément Léger clement.leger at bootlin.com
Wed Jun 29 17:30:35 AEST 2022


Le Tue, 28 Jun 2022 17:00:45 +0000,
Christophe Leroy <christophe.leroy at csgroup.eu> a écrit :

> > -static int pSeries_reconfig_add_node(const char *path, struct property *proplist)
> > +static struct device_node *pSeries_reconfig_add_node(const char *path)
> >   {
> > -	struct device_node *np;
> > -	int err = -ENOMEM;
> > -
> > -	np = kzalloc(sizeof(*np), GFP_KERNEL);
> > -	if (!np)
> > -		goto out_err;
> > -
> > -	np->full_name = kstrdup(kbasename(path), GFP_KERNEL);
> > -	if (!np->full_name)
> > -		goto out_err;
> > -
> > -	np->properties = proplist;
> > -	of_node_set_flag(np, OF_DYNAMIC);
> > -	of_node_init(np);
> > +	struct device_node *np, *parent;
> >   
> > -	np->parent = pseries_of_derive_parent(path);
> > -	if (IS_ERR(np->parent)) {
> > -		err = PTR_ERR(np->parent);
> > -		goto out_err;
> > +	np = of_find_node_by_path(path)  
> 
> Missing ;
> 
> Did you test build ?

I generally test build for powerpc but it seems like I forgot to rebuild
my powerpc kernel build after this modification. It seems like only
this error did not pass through the test build. I'll try to be more
careful next time.

Sorry for that.

-- 
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com


More information about the Linuxppc-dev mailing list