From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Subject: Re: [PATCH v2 2/2] of: changesets: Introduce changeset helper methods Date: Sun, 13 Nov 2016 09:14:00 +0100 Message-ID: <8c8e58ad-3218-ecea-a58f-f1583c86e1a8@redhat.com> References: <20161104144241.18002-1-hdegoede@redhat.com> <20161104144241.18002-2-hdegoede@redhat.com> <5827CCC3.90003@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5827CCC3.90003-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Frank Rowand , Rob Herring , Pantelis Antoniou Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: devicetree@vger.kernel.org Hi, On 13-11-16 03:15, Frank Rowand wrote: > On 11/04/16 07:42, Hans de Goede wrote: >> From: Pantelis Antoniou >> >> Changesets are very powerful, but the lack of a helper API >> makes using them cumbersome. Introduce a simple copy based >> API that makes things considerably easier. >> >> To wit, adding a property using the raw API. >> >> struct property *prop; >> prop = kzalloc(sizeof(*prop)), GFP_KERNEL); >> prop->name = kstrdup("compatible"); >> prop->value = kstrdup("foo,bar"); >> prop->length = strlen(prop->value) + 1; >> of_changeset_add_property(ocs, np, prop); >> >> while using the helper API >> >> of_changeset_add_property_string(ocs, np, "compatible", >> "foo,bar"); >> >> Signed-off-by: Pantelis Antoniou >> Signed-off-by: Hans de Goede >> --- >> Changes in v2 (hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org): >> -Address review comments from: >> https://www.spinics.net/lists/kernel/msg2252845.html > > That points to the May 9 version 1 patches from Pantelis (as expected), > but containing 4, not 2, patches. Patch 1/4 was applied. Patch 4/4 > seems to have disappeared? Ah, I cherry picked this into my tree a long time ago, hoping Pantelis himself would upstream them, so I only cherry picked the bare minimum and I did not pick-up the unit tests. > Pantelis then sent a version 2 set of the patches on May 16. Hmm, I never found this in google. > Your version is a modification of the May 9 patches (as would be expected > of a version 2). It is confusing to have two different version 2 patch > sets. I don't have any brilliant ideas on how this patch set could have > been named differently to avoid that confusion. Actually my patches were cherry picked from Pantelis' beaglebone capemanager tree, which I hope contained the last version. > The point of this little side-track is simply to note the existence of two > different version 2 series so I won't be confused when I revisit this > thread in the future. Ack, sorry about that. Regards, Hans > >> -Simplify (and fix) __of_changeset_add_update_property_copy OOM handling >> -Remove (by manual inlining) these 2 static helpers: >> __of_changeset_add_update_property_u32 >> __of_changeset_add_update_property_bool >> -Remove the following exported helper method: >> of_changeset_node_move_to > > Not all comments were addressed. > > There are some other changes made that are not noted in the changelog. > > I am still reading through the patches. I will reply again either with > a reviewed-by or specific comments when I finish. > > -Frank > >> --- >> drivers/of/dynamic.c | 428 +++++++++++++++++++++++++++++++++++++++++++++++++++ >> include/linux/of.h | 135 ++++++++++++++++ >> 2 files changed, 563 insertions(+) > > < snip > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html