From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756706AbbIUMgy (ORCPT ); Mon, 21 Sep 2015 08:36:54 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:34699 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756318AbbIUMgw convert rfc822-to-8bit (ORCPT ); Mon, 21 Sep 2015 08:36:52 -0400 Subject: Re: [PATCH v2 2/2] of: changesets: Introduce changeset helper methods Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 From: Pantelis Antoniou In-Reply-To: Date: Mon, 21 Sep 2015 15:36:47 +0300 Cc: Rob Herring , Frank Rowand , Matt Porter , Koen Kooi , Guenter Roeck , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Transfer-Encoding: 8BIT Message-Id: <324F27EC-FC71-4C50-926A-08AAF2A1114C@konsulko.com> References: <1442419866-4982-1-git-send-email-pantelis.antoniou@konsulko.com> <1442419866-4982-3-git-send-email-pantelis.antoniou@konsulko.com> To: Geert Uytterhoeven X-Mailer: Apple Mail (2.2104) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Geert, > On Sep 21, 2015, at 15:35 , Geert Uytterhoeven wrote: > > Hi Pantelis, > > On Wed, Sep 16, 2015 at 6:11 PM, Pantelis Antoniou > wrote: >> 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"); > > What about removing properties? > Once upon a time there was that capability. It was removed after we didn’t have a good use for them yet. Do you have any? I’d be happy to re-add it :) > Gr{oetje,eeting}s, > > Geert > Regards — Pantelis > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pantelis Antoniou Subject: Re: [PATCH v2 2/2] of: changesets: Introduce changeset helper methods Date: Mon, 21 Sep 2015 15:36:47 +0300 Message-ID: <324F27EC-FC71-4C50-926A-08AAF2A1114C@konsulko.com> References: <1442419866-4982-1-git-send-email-pantelis.antoniou@konsulko.com> <1442419866-4982-3-git-send-email-pantelis.antoniou@konsulko.com> Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Geert Uytterhoeven Cc: Rob Herring , Frank Rowand , Matt Porter , Koen Kooi , Guenter Roeck , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" List-Id: devicetree@vger.kernel.org Hi Geert, > On Sep 21, 2015, at 15:35 , Geert Uytterhoeven = wrote: >=20 > Hi Pantelis, >=20 > On Wed, Sep 16, 2015 at 6:11 PM, Pantelis Antoniou > wrote: >> 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. >>=20 >> To wit, adding a property using the raw API. >>=20 >> struct property *prop; >> prop =3D kzalloc(sizeof(*prop)), GFP_KERNEL); >> prop->name =3D kstrdup("compatible"); >> prop->value =3D kstrdup("foo,bar"); >> prop->length =3D strlen(prop->value) + 1; >> of_changeset_add_property(ocs, np, prop); >>=20 >> while using the helper API >>=20 >> of_changeset_add_property_string(ocs, np, "compatible", >> "foo,bar"); >=20 > What about removing properties? >=20 Once upon a time there was that capability. It was removed after we did= n=E2=80=99t have a good use for them yet. Do you have any? I=E2=80=99d be happy to re-ad= d it :) > Gr{oetje,eeting}s, >=20 > Geert >=20 Regards =E2=80=94 Pantelis > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linu= x-m68k.org >=20 > In personal conversations with technical people, I call myself a hack= er. But > when I'm talking to journalists I just say "programmer" or something = like that. > -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html