From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hgvNcYez" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E8DAB; Wed, 13 Dec 2023 05:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702473729; x=1734009729; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=aynrVvDsgLEQ+oNpXkj3YsTsnJctWZHApJV8F3owo30=; b=hgvNcYezeBjiQ/qv58XjF9NRFTvZ/5kUMix9yF7LU/5YhhEz1P3CR1RU Sso90NlRp441xL05XJAzGeZp8rva+PJb6HeqT7FeDa7VKHBlB287++3o/ 0KLUmadjg3OzIinqjpKJwP+95WM45tP42Mg1grSjgkUh7eoC7NbmrGxlg 2fTN5AiCAjFVmks51PmU4TfpSbqx0DgZcO1xzNBFLkMWUgwTgFBskR3U5 cNxH5/Jw4hfxH9ZpRPQzXCXFW6NWaxwB7Os3Qx5u23hHEiPXzRmkIsVcW /Sp39rkyweiXtrh3+VhIpmoke7nXuqOYA3z90x/ROjY8/KhGK6FBaK6hZ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="398804938" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="398804938" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 05:22:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="864625953" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="864625953" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 05:21:59 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rDPBT-00000005X7P-2zJE; Wed, 13 Dec 2023 15:21:55 +0200 Date: Wed, 13 Dec 2023 15:21:55 +0200 From: Andy Shevchenko To: Paul Cercueil Cc: Linus Walleij , Bartosz Golaszewski , Geert Uytterhoeven , Rasmus Villemoes , Biju Das , Claudiu Beznea , Jianlong Huang , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Ray Jui , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang , Lakshmi Sowjanya D , Emil Renner Berthing , Hal Feng Subject: Re: [PATCH v5 03/13] pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP() Message-ID: References: <20231211190321.307330-1-andriy.shevchenko@linux.intel.com> <20231211190321.307330-4-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Wed, Dec 13, 2023 at 10:55:46AM +0100, Paul Cercueil wrote: > Le lundi 11 décembre 2023 à 20:57 +0200, Andy Shevchenko a écrit : ... > > -#define INGENIC_PIN_GROUP(name, id, func) \ > > - INGENIC_PIN_GROUP_FUNCS(name, id, (void *)(func)) > > +#define INGENIC_PIN_GROUP(_name_, id, > > func) \ > > + { > > \ > > + .name = > > _name_, \ > > + .pins = > > id##_pins, \ > > + .num_pins = > > ARRAY_SIZE(id##_pins), \ > > + .data = (void > > *)func, \ > > + } > > This INGENIC_PIN_GROUP() macro doesn't need to be modified, does it? We can go either way. I prefer to go this way as it reduces level of indirections in the macros. It makes code easier to read and understand. But if you insist, I can drop that change in next version. -- 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 886CDC4167B for ; Wed, 13 Dec 2023 13:22:43 +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=d61T+t83AWsnootCCcKuj9jrndo5zifR8X6UBPD/naU=; b=cb7Tryv0geAFM7 QiOpyam1helaNEpVPO8va87+i6ILEYtKHvfClPFNxMKzdzgnI2dU6pXSU/HnDBc36xjoQhhsGSAFM il1tyJDWr4YO52p7uv3fEV5Og9HXrTFPt8X77bwIcB/4wUOXcVlM1U0I50g1JnLT7kRbPV3OTxY7G 59ARK08r4x1yXtcKs3a/E/vkZ6EReCw3TOPL5T20+Sf6X8Ua4qPFkVngmd0gI9cy5yQfBSS9LzcJY 24mfRKOxA7FvlnsZyhpRtlBP2Qvi5I816lMgKw6xQWLTLsy3Pitlq34MOHhkIdz1VunokpOes4Mp6 dalLDvPPdInNkdPzdE2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDPBm-00EmUB-0q; Wed, 13 Dec 2023 13:22:14 +0000 Received: from mgamail.intel.com ([134.134.136.65]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDPBj-00EmSy-2u; Wed, 13 Dec 2023 13:22:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702473731; x=1734009731; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=aynrVvDsgLEQ+oNpXkj3YsTsnJctWZHApJV8F3owo30=; b=SzNEbkSAeMETT1ygxQsJFoiqboJb/f9hyAPGm7msIlJbyCk4o/x0i8NR yxTHJczLLMNNrNUZaq3dwk0u/Qs/zHOT5kZDMGuwBSRb6TMVyjBUflOXB Q/B/co4rf5+J50f50F7LvxyoJn9aQyajF1i/WXtXQuvvX6j/uGyNzPXGp Yh2KeSr/ffBfepEOvnr8MRJ6oZP7+BemGb++j0c8Nh5l8q51Jxn0NY3to fqlGj1asOF5RPnCiSqPBv9deRA4xfO2uxq8x7suMjAghonv6OhqxYgM+9 msYAS5DRrFZi5ppmArLCbMbejyAzmmkDUIenJhEz2NHXzjD1Z3EQwTr4b w==; X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="398804949" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="398804949" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 05:22:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10922"; a="864625953" X-IronPort-AV: E=Sophos;i="6.04,272,1695711600"; d="scan'208";a="864625953" Received: from smile.fi.intel.com ([10.237.72.54]) by FMSMGA003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 05:21:59 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rDPBT-00000005X7P-2zJE; Wed, 13 Dec 2023 15:21:55 +0200 Date: Wed, 13 Dec 2023 15:21:55 +0200 From: Andy Shevchenko To: Paul Cercueil Cc: Linus Walleij , Bartosz Golaszewski , Geert Uytterhoeven , Rasmus Villemoes , Biju Das , Claudiu Beznea , Jianlong Huang , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-mips@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Ray Jui , Scott Branden , Broadcom internal kernel review list , Dong Aisheng , Fabio Estevam , Shawn Guo , Jacky Bai , Pengutronix Kernel Team , Sascha Hauer , NXP Linux Team , Sean Wang , Lakshmi Sowjanya D , Emil Renner Berthing , Hal Feng Subject: Re: [PATCH v5 03/13] pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP() Message-ID: References: <20231211190321.307330-1-andriy.shevchenko@linux.intel.com> <20231211190321.307330-4-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-20231213_052212_005391_406215FF X-CRM114-Status: GOOD ( 12.08 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 13, 2023 at 10:55:46AM +0100, Paul Cercueil wrote: > Le lundi 11 d=E9cembre 2023 =E0 20:57 +0200, Andy Shevchenko a =E9crit=A0: ... > > -#define INGENIC_PIN_GROUP(name, id, func) \ > > - INGENIC_PIN_GROUP_FUNCS(name, id, (void *)(func)) > > +#define INGENIC_PIN_GROUP(_name_, id, > > func) \ > > + { = > > \ > > + .name =3D > > _name_, \ > > + .pins =3D > > id##_pins, \ > > + .num_pins =3D > > ARRAY_SIZE(id##_pins), \ > > + .data =3D (void > > *)func, \ > > + } > = > This INGENIC_PIN_GROUP() macro doesn't need to be modified, does it? We can go either way. I prefer to go this way as it reduces level of indirections in the macros. It makes code easier to read and understand. But if you insist, I can drop that change in next version. -- = 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