Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570486
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() |
| Date | Tue, 31 Jan 2017 10:00:02 +0100 |
| Message-ID | <t5Csa-70d-5@gated-at.bofh.it> (permalink) |
| References | <t5mno-5Iu-9@gated-at.bofh.it> <t5mno-5Iu-19@gated-at.bofh.it> <t5v7k-2HW-17@gated-at.bofh.it> <t5BFM-6K3-11@gated-at.bofh.it> |
| X-Original-To | Boris Brezillon <boris.brezillon@free-electrons.com> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JjsNOrhcCIM6rKQEx49XVXwIKj2GOkmu7buEOxe2fjw=; b=oaoM+SpEWvptIbA/epx1T2+YKgdYreg9ipNFh8ZlnRbS3HytcXqapzwbhOsjB/Wwpy 5yj4+o5TTCRODphVpeXSX/63dyBx/ThkQMeLMQsgHkKeJsnSHR+sT5pk7prkok9K93yq YQnlGKs62pStZt0ZBDR3HxnCLV+Dt7kP3qlL/isjZ4dW8Gn3MzH3sktBwPRnbyCdzYl9 F7y5Olcgmgtqh1x6reEI1uuK/L6lHZCXxidtaP90V2TJu2wTzHF/R1DWzVM+4FV3WajH nJ9ToZwHtmqiA2byGt8fjCehqbrwjknPhPTC0UCobqd4Kz5Kjmc7Lfmotxg2x9Zp872B /72w== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JjsNOrhcCIM6rKQEx49XVXwIKj2GOkmu7buEOxe2fjw=; b=JPgSkskGJiFcKzs2rplpMnCQsSII6UD9nqWqigcGj1WwsM1603VEPxunmhpSKALWJr eAoWTl9vNiDyZq5VtWqGX75ewQ8Mu+Uu3EjQOmYEH2NCBsRDU5+ugia4iwezMsCaLmNx d1N01mIN43+sahR4tZqcT2MAufBatOA+aLJRETh9Ip8T7mqmPnT8atpyH5f49VbLP+LM 6H+/I19DRkVf4EIW0yC7MTSIX8BX9T0a7eFSdFZO2gsBUnC1qjKFJwUeiZxMl24ssLpY zbqcIgvgeiQkh0q1aAyw5Q4lJagSsdNRtZpaqBF1snWWQd/zIJF+0hKNn/et9eaJ+/KL sHHg== |
| X-Gm-Message-State | AIkVDXI4CMr/h1bfNc9KIQqpNa39zPSLAdo6GojUJEsugTmbvixWJrHKZ6tVtFv1ll7M8w== |
| X-Received | by 10.98.194.153 with SMTP id w25mr27715959pfk.181.1485852290248; Tue, 31 Jan 2017 00:44:50 -0800 (PST) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 55 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Linus Walleij <linus.walleij@linaro.org>, Alexandre Courbot <gnurou@gmail.com>, linux-gpio@vger.kernel.org, linux-input@vger.kernel.org, Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>, Jacek Anaszewski <j.anaszewski@samsung.com>, linux-leds@vger.kernel.org, Tomi Valkeinen <tomi.valkeinen@ti.com>, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King <linux@armlinux.org.uk> |
| X-Original-Date | Tue, 31 Jan 2017 00:44:47 -0800 |
| X-Original-Message-ID | <20170131084447.GD8311@dtor-ws> |
| X-Original-References | <1485790909-2915-1-git-send-email-boris.brezillon@free-electrons.com> <1485790909-2915-2-git-send-email-boris.brezillon@free-electrons.com> <20170131010607.GC35974@dtor-ws> <20170131090432.72a1b1b8@bbrezillon> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1570486 |
Show key headers only | View raw
On Tue, Jan 31, 2017 at 09:04:32AM +0100, Boris Brezillon wrote: > On Mon, 30 Jan 2017 17:06:07 -0800 > Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote: > > > On Mon, Jan 30, 2017 at 04:41:48PM +0100, Boris Brezillon wrote: > > > Rename devm_get_gpiod_from_child() into > > > devm_fwnode_get_gpiod_from_child() to reflect the fact that this > > > function is operating on a fwnode object. > > > > I believe this is completely pointless rename. Are you planning on > > adding devm_of_get_gpiod_from_child()? Or > > devm_acpt_get_gpiod_from_child()? (I sure hope not). > > Of course not. > > > > > Also, on what object? Does it take fwnode as first argument? Or maybe we > > should call it devm_dev_const_charp_fwnode_get_gpiod_from_child() so we > > know types of all arguments? > > Linus suggested to rename this function [1]. I personally don't care > much about the name, though I agree with Linus that names should be > consistent and descriptive. Moreover, he's the maintainer, and I tend > to follow maintainers suggestion when I contribute to a specific > subsystem. OK, I did not know that that was Linus' request, my objection still stands. > > IIUC, you're concerned about the length of this function name. If I had > to drop something it would be the _from_child() suffix, because the > function is not even checking that the child parameter is actually a > direct child (or a descendant) of device->fwnode. OK, that sounds better. Actually, we already have fwnode_get_named_gpiod(), unfortunately it does not do suffixes permutations. There are also no users, except devm_get_gpiod_from_child(). So I would: - rename fwnode_get_named_gpiod() -> static __fwnode_get_named_gpiod() - made new fwnode_get_named_gpiod() that did suffix permutation and called __fwnode_get_named_gpiod() (or pulled its implementation inline) - renamed devm_get_gpiod_from_child() -> devm_fwnode_get_named_gpiod(dev, fwnode, con_id) and called fwnode_get_named_gpiod(). This would indeed match the pattern with other fwnode/property handling APIs. Thanks. -- Dmitry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-30 16:50 +0100
[PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-30 16:50 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Jacek Anaszewski <jacek.anaszewski@gmail.com> - 2017-01-30 21:00 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 02:10 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-31 09:10 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 10:00 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-31 10:10 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 10:20 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-31 10:40 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-01-31 19:50 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-31 20:50 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Linus Walleij <linus.walleij@linaro.org> - 2017-02-01 14:10 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-02-01 14:30 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Linus Walleij <linus.walleij@linaro.org> - 2017-02-01 16:00 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-01 18:20 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-02-02 11:10 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-02-01 18:20 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Linus Walleij <linus.walleij@linaro.org> - 2017-02-02 12:00 +0100
Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-02-02 13:00 +0100
[PATCH 2/2] gpio: Add the devm_fwnode_get_index_gpiod_from_child() helper Boris Brezillon <boris.brezillon@free-electrons.com> - 2017-01-30 16:50 +0100
csiph-web