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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 932E0C433F5 for ; Wed, 30 Mar 2022 11:36:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EVZcSOSfeADCnVMsP8mX5reklK34Uim1mFjm1WSBUs8=; b=zLtbV4VaIaPg6i hcT60+MslscOep//7SAclLa2gD/y/pUbChYaIurCTbZ+6KMN3uopzlgFh9aJhlRX4j5TMVY+UYeZs A5ilV9r1d7Ex7P2+VPz9QUFQ6GbzOtFNiMLfrvsac8Mavvuz86BetqHTrV/FRFvRCrYGXVPbu993s 9H+KFuSve0RA+sIuKBM3mBXbTpSphqNTD/HxlMFYI41L5mNwSnqU1KE9wH7WXAaSd4l4Y6aBussVT AzyBs64dx3Tj9WDatrvrWoyqh3zv7QBiyrY3q1SA3xGz2MEae5DHmh0slq3cm+NCvo+eQs2Jiu7m8 o39qj1LC5cAEAIWjoSKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZWcL-00FNBD-7W; Wed, 30 Mar 2022 11:36:01 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZWc6-00FN67-DR; Wed, 30 Mar 2022 11:35:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648640146; x=1680176146; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WvB6mJ9ryWwQ7CmVODZdOzNBEGHGFiTgCdDbkTsS7Js=; b=Fuy/BXTpzFIFmrAZFdWCU5Qp+4QK3oC127c+5GMN14tBfm7FOlDH/q6K OHEGtJeMBBwvDDG9co780PpEMAgZ1Ye8iKMpEidEIMVhVDhcOtLt6Xsyg YlWDWo8b8ZN9KvjqL5TxsiYGpSp+9oOCa8nFFurlhNch8BrEXY18QkpME UvV8xgS44ZRZ02z8XhMzJyaUPkbMwmDanTV80TG6ip8JLKiQ7BK2j7+K0 QADzIk9EdePXPB1ctkKnZEznqKdazrNjHpn7vhqUc8TGp5akuULIpiX9I i3rbQl1mk5uT9svgozrv2yT0JH4B+OkrKxmAk2reSK00/avqSd/GMfvxv g==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="284426760" X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="284426760" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 04:35:44 -0700 X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="519649292" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 04:35:35 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nZWbM-009N8T-Sw; Wed, 30 Mar 2022 14:35:00 +0300 Date: Wed, 30 Mar 2022 14:35:00 +0300 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Qianggui Song , Krzysztof Kozlowski , Fabien Dessenne , "open list:GPIO SUBSYSTEM" , Linux ARM , "open list:ARM/Amlogic Meson..." , Linux Kernel Mailing List , openbmc@lists.ozlabs.org, Linux-Renesas , linux-samsung-soc , linux-stm32@st-md-mailman.stormreply.com, Linus Walleij , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Geert Uytterhoeven , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Bartosz Golaszewski , Philipp Zabel Subject: Re: [PATCH v2 02/13] gpiolib: Introduce gpiochip_node_count() helper Message-ID: References: <20220329152926.50958-1-andriy.shevchenko@linux.intel.com> <20220329152926.50958-3-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220330_043546_508613_FC0AABAE X-CRM114-Status: GOOD ( 12.70 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org On Wed, Mar 30, 2022 at 12:02:07PM +0200, Geert Uytterhoeven wrote: > On Tue, Mar 29, 2022 at 5:29 PM Andy Shevchenko > wrote: ... > > + unsigned int count; > > Preinitialize to zero? Whatever for what consensus will be achieved. Initially I have that way, then I changed. > > + count = 0; > > + for_each_gpiochip_node(dev, child) > > + count++; > > Regardless: > Reviewed-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven Thanks! -- With Best Regards, Andy Shevchenko _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE12EC433EF for ; Wed, 30 Mar 2022 11:35:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343683AbiC3Lha (ORCPT ); Wed, 30 Mar 2022 07:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235330AbiC3Lh3 (ORCPT ); Wed, 30 Mar 2022 07:37:29 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95F7A1E3765; Wed, 30 Mar 2022 04:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648640144; x=1680176144; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WvB6mJ9ryWwQ7CmVODZdOzNBEGHGFiTgCdDbkTsS7Js=; b=EK5Al7l7Is0w9/DsuO0AHaj2snZxjbegcrQo0Gb0Y+0Y82rRnFe2v9fO Lc7W3xk1rYt6IlpujbgfWrQDHoPHsqDLk3/BAuU89G4GGNCNQlRkTLDCg N6y7919zdcYKJ4AtA+Qwj+VJ8X7VbAZBQjdctza6yIxuXYcjAqWullst2 PFukbBUXkQ/EnW/lov6M1s+WgcOcxOG2JDudUUs5mZIFqqsc24fRq03Uh JfJChFbX/Sw9hZMoBecvYscLEOFJH0sEium/gr2lhtJll7mtPXV8LdrEX hI9Oq9cTWiJiCuDBBqokRsSGWngapDaz8JakFJ300f2WisKRbkNnylcEN A==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="247018452" X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="247018452" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 04:35:44 -0700 X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="519649292" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 04:35:35 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nZWbM-009N8T-Sw; Wed, 30 Mar 2022 14:35:00 +0300 Date: Wed, 30 Mar 2022 14:35:00 +0300 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Qianggui Song , Krzysztof Kozlowski , Fabien Dessenne , "open list:GPIO SUBSYSTEM" , Linux ARM , "open list:ARM/Amlogic Meson..." , Linux Kernel Mailing List , openbmc@lists.ozlabs.org, Linux-Renesas , linux-samsung-soc , linux-stm32@st-md-mailman.stormreply.com, Linus Walleij , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Geert Uytterhoeven , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Bartosz Golaszewski , Philipp Zabel Subject: Re: [PATCH v2 02/13] gpiolib: Introduce gpiochip_node_count() helper Message-ID: References: <20220329152926.50958-1-andriy.shevchenko@linux.intel.com> <20220329152926.50958-3-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, Mar 30, 2022 at 12:02:07PM +0200, Geert Uytterhoeven wrote: > On Tue, Mar 29, 2022 at 5:29 PM Andy Shevchenko > wrote: ... > > + unsigned int count; > > Preinitialize to zero? Whatever for what consensus will be achieved. Initially I have that way, then I changed. > > + count = 0; > > + for_each_gpiochip_node(dev, child) > > + count++; > > Regardless: > Reviewed-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven Thanks! -- With Best Regards, Andy Shevchenko 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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98A19C433EF for ; Wed, 30 Mar 2022 11:36:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OTLT7D6TLDCoaQY5b29TlAiHWwakc65UHA4WAO+fDVM=; b=xeMhfbegDwsB/5 YONBpvBJ5ETA4nSsvHYVcnSj+AhvHsdietym7hvCykZJMyBmMvf+ojNYQ+YLXq6uxLjWGGmyfMuKo GGO22gklm4noGbApZlvzkb4WHr1McYL7by6o9Avbpmio0wGSXkzrNvsLXZ29JwVjcDcpMaYnyxI/U 9D4+w/TVqZ+UGellbkdaaLRJ2HscHAOIRhn1VPXR1/ZJqIvJ+PU7D5VshvDoCzcGOU8RTRU1NTGU0 n1FkciYzW6rxM+xy1eUyJyEqd9xwIgU78lX7TZyWOCQCU8DLgRCAzgguN8O7/0EZF5gVhQnAGqmI7 W7G/pv/8Lv9rQJerjtjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZWcB-00FN8N-P7; Wed, 30 Mar 2022 11:35:51 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZWc6-00FN67-DR; Wed, 30 Mar 2022 11:35:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648640146; x=1680176146; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=WvB6mJ9ryWwQ7CmVODZdOzNBEGHGFiTgCdDbkTsS7Js=; b=Fuy/BXTpzFIFmrAZFdWCU5Qp+4QK3oC127c+5GMN14tBfm7FOlDH/q6K OHEGtJeMBBwvDDG9co780PpEMAgZ1Ye8iKMpEidEIMVhVDhcOtLt6Xsyg YlWDWo8b8ZN9KvjqL5TxsiYGpSp+9oOCa8nFFurlhNch8BrEXY18QkpME UvV8xgS44ZRZ02z8XhMzJyaUPkbMwmDanTV80TG6ip8JLKiQ7BK2j7+K0 QADzIk9EdePXPB1ctkKnZEznqKdazrNjHpn7vhqUc8TGp5akuULIpiX9I i3rbQl1mk5uT9svgozrv2yT0JH4B+OkrKxmAk2reSK00/avqSd/GMfvxv g==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="284426760" X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="284426760" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 04:35:44 -0700 X-IronPort-AV: E=Sophos;i="5.90,222,1643702400"; d="scan'208";a="519649292" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 04:35:35 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nZWbM-009N8T-Sw; Wed, 30 Mar 2022 14:35:00 +0300 Date: Wed, 30 Mar 2022 14:35:00 +0300 From: Andy Shevchenko To: Geert Uytterhoeven Cc: Qianggui Song , Krzysztof Kozlowski , Fabien Dessenne , "open list:GPIO SUBSYSTEM" , Linux ARM , "open list:ARM/Amlogic Meson..." , Linux Kernel Mailing List , openbmc@lists.ozlabs.org, Linux-Renesas , linux-samsung-soc , linux-stm32@st-md-mailman.stormreply.com, Linus Walleij , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Avi Fishman , Tomer Maimon , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , Geert Uytterhoeven , Tomasz Figa , Sylwester Nawrocki , Alim Akhtar , Maxime Coquelin , Alexandre Torgue , Bartosz Golaszewski , Philipp Zabel Subject: Re: [PATCH v2 02/13] gpiolib: Introduce gpiochip_node_count() helper Message-ID: References: <20220329152926.50958-1-andriy.shevchenko@linux.intel.com> <20220329152926.50958-3-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220330_043546_508613_FC0AABAE X-CRM114-Status: GOOD ( 12.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Mar 30, 2022 at 12:02:07PM +0200, Geert Uytterhoeven wrote: > On Tue, Mar 29, 2022 at 5:29 PM Andy Shevchenko > wrote: ... > > + unsigned int count; > > Preinitialize to zero? Whatever for what consensus will be achieved. Initially I have that way, then I changed. > > + count = 0; > > + for_each_gpiochip_node(dev, child) > > + count++; > > Regardless: > Reviewed-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven Thanks! -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel