From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751939AbdBAOvK (ORCPT ); Wed, 1 Feb 2017 09:51:10 -0500 Received: from mail-it0-f42.google.com ([209.85.214.42]:35345 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751014AbdBAOvI (ORCPT ); Wed, 1 Feb 2017 09:51:08 -0500 MIME-Version: 1.0 In-Reply-To: <20170201142228.053e2041@bbrezillon> 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> <20170131084447.GD8311@dtor-ws> <20170131100721.22c2388d@bbrezillon> <20170131091155.GH8311@dtor-ws> <20170131102424.7b68c0d4@bbrezillon> <20170131183936.GB13642@dtor-ws> <20170131204202.7b589ca6@bbrezillon> <20170201142228.053e2041@bbrezillon> From: Linus Walleij Date: Wed, 1 Feb 2017 15:51:06 +0100 Message-ID: Subject: Re: [PATCH 1/2] gpio: Rename devm_get_gpiod_from_child() To: Boris Brezillon , Mika Westerberg , Alexandre Courbot Cc: Dmitry Torokhov , "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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? 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? Yours, Linus Walleij