Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571795
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() |
| Date | 2017-02-01 18:20 +0100 |
| Message-ID | <t66JA-iP-33@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <t5LF8-47z-15@gated-at.bofh.it> <t5MBc-4Gh-15@gated-at.bofh.it> <t62PE-6ol-11@gated-at.bofh.it> <t6390-6uR-13@gated-at.bofh.it> <t64y6-7eg-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Feb 01, 2017 at 03:51:06PM +0100, Linus Walleij wrote: > On Wed, Feb 1, 2017 at 2:22 PM, Boris Brezillon > <boris.brezillon@free-electrons.com> wrote: > > On Wed, 1 Feb 2017 14:05:43 +0100 > > Linus Walleij <linus.walleij@linaro.org> wrote: > > >> > Linus, is this something you really care about? If that's the case, can > >> > you step in? > >> > >> I can only throw up my hands... > > > > Sorry for forcing your hand like this, but this is the kind of > > discussion I'm not comfortable with (when I need to argue on something > > I'm not completely convinced of, or I don't have opinion on). > > Sorry, I'm just too stressed by all patches. I now read back on the > context below. > > >> The way I percieved it, a new function > >> was added, but I guess it could be that the diffstat was so > >> convoluted in the other patch (by the way that diff sometimes give > >> very confusing stuff unless you use the right fuzz) so I misunderstood > >> some other renaming as introducing a new function. > > > > Indeed, a new function is added (see patch 2), and this new function is > > taking an additional 'index' parameter. If that's a problem, I can also > > change the prototype of devm_get_gpiod_from_child() and patch all > > existing users of this function, but I fear we'll end up with pretty > > much the same discussion :-/. > > Yeah. > > >> Please drop the patch if it is controversial. > >> > >> The name of the function *is* confusing though but maybe it's not > >> the biggest problem in the world. > > > > I can still name the new function as you suggested > > (devm_fwnode_get_index_gpiod_from_child()), and keep the existing one > > unchanged if you want. > > But that is just insane. Then it is just better to apply this and the > other patch making the situation manageable. > > This is a good time to do it too since I'm anyways patching around > in all the consumers this merge window. > > Dmitry: is this such a big deal to you? No, not really. But sometimes it is soooo hard to pass on some bikeshedding opportunity ;) > > commit 40b7318319281b1bdec804f6435f26cadd329c13 > "gpio: Support for unified device properties interface" > > by Mika Westerberg introduced > > fwnode_get_named_gpiod() > devm_get_gpiod_from_child() > > Both are taking a fwnode as argument and the naming is as > inconsistent as it can be. > > Some more churn should be expected as a side > effect of naming this function wrong in the first place. > The fwnode API change was on fast-forward and mistakes > were made, also by me, mea culpa. > > When I write kernel code, I usually intuitively look for a function doing > what I want, this naming is unintuitive, and it has confused me so > it will confuse others. > > Can I please apply these two patches? You have my ack for the input bits. Thanks. -- Dmitry
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web