Re: [PATCH v3 06/11] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()

From: Leonardo Bras
Date: Fri Apr 30 2021 - 12:06:10 EST


On Fri, 2021-04-23 at 19:04 +1000, Alexey Kardashevskiy wrote:
>
> > + win64->name = kstrdup(propname, GFP_KERNEL);
> > + ddwprop = kzalloc(sizeof(*ddwprop), GFP_KERNEL);
> > + win64->value = ddwprop;
> > + win64->length = sizeof(*ddwprop);
> > + if (!win64->name || !win64->value) {
> > + kfree(win64);
> > + kfree(win64->name);
> > + kfree(win64->value);
>
>
> Wrong order.
>

Right! Sorry about that.
Changed for next version!

> >
> >
> > +out_del_win:
>
>
> (I would not bother but since I am commenting on the patch)
>
> nit: the new name is not that much better than the old
> "out_clear_window:" ("out_remove_win" would be a bit better) and it does
> make reviewing a little bit harder. Thanks,

Replaced by out_remove_win
Thanks!