From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753735AbdBARS4 (ORCPT ); Wed, 1 Feb 2017 12:18:56 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35961 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753710AbdBARSu (ORCPT ); Wed, 1 Feb 2017 12:18:50 -0500 Date: Wed, 1 Feb 2017 09:18:46 -0800 From: Dmitry Torokhov To: Linus Walleij Cc: Boris Brezillon , Mika Westerberg , Alexandre Courbot , "linux-gpio@vger.kernel.org" , Linux Input , Bryan Wu , Richard Purdie , Jacek Anaszewski , "linux-leds@vger.kernel.org" , Tomi Valkeinen , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Russell King Subject: Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() Message-ID: <20170201171846.GC40045@dtor-ws> References: <20170131090432.72a1b1b8@bbrezillon> <20170131084447.GD8311@dtor-ws> <20170131100721.22c2388d@bbrezillon> <20170131091155.GH8311@dtor-ws> <20170131102424.7b68c0d4@bbrezillon> <20170131183936.GB13642@dtor-ws> <20170131204202.7b589ca6@bbrezillon> <20170201142228.053e2041@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 01, 2017 at 03:51:06PM +0100, Linus Walleij wrote: > On Wed, Feb 1, 2017 at 2:22 PM, Boris Brezillon > wrote: > > On Wed, 1 Feb 2017 14:05:43 +0100 > > Linus Walleij 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