From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D1D4C49ED6 for ; Wed, 11 Sep 2019 17:10:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6BE42085B for ; Wed, 11 Sep 2019 17:10:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729256AbfIKRKV (ORCPT ); Wed, 11 Sep 2019 13:10:21 -0400 Received: from mga01.intel.com ([192.55.52.88]:28396 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729182AbfIKRKV (ORCPT ); Wed, 11 Sep 2019 13:10:21 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Sep 2019 10:10:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,494,1559545200"; d="scan'208";a="185879140" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga007.fm.intel.com with ESMTP; 11 Sep 2019 10:10:19 -0700 Received: from andy by smile with local (Exim 4.92.1) (envelope-from ) id 1i868I-0001wy-CC; Wed, 11 Sep 2019 20:10:18 +0300 Date: Wed, 11 Sep 2019 20:10:18 +0300 From: Andy Shevchenko To: Dmitry Torokhov Cc: Linus Walleij , Mika Westerberg , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH 08/11] gpiolib: of: tease apart of_find_gpio() Message-ID: <20190911171018.GT2680@smile.fi.intel.com> References: <20190911075215.78047-1-dmitry.torokhov@gmail.com> <20190911075215.78047-9-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190911075215.78047-9-dmitry.torokhov@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, Sep 11, 2019 at 12:52:12AM -0700, Dmitry Torokhov wrote: > Tease apart of_find_gpio() into common function that works on the > firmware node, and a fallback handler that works on the device > structure, so that we can later use of_find_gpio() in > fwnode_gpiod_get_index(). > + desc = of_find_gpio(dev_fwnode(dev), > + con_id, idx, &lookupflags); Couple of parameters can be placed on previous line. > + if (desc == ERR_PTR(-ENOENT)) > + desc = of_find_gpio_fallback(dev, con_id, idx, > + &lookupflags); > + Do we need extra blank line? -- With Best Regards, Andy Shevchenko