From: Paul Cercueil <paul@crapouillou.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Biju Das <biju.das.jz@bp.renesas.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
Jianlong Huang <jianlong.huang@starfivetech.com>,
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
Cc: Ray Jui <rjui@broadcom.com>,
Scott Branden <sbranden@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
Dong Aisheng <aisheng.dong@nxp.com>,
Fabio Estevam <festevam@gmail.com>,
Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
NXP Linux Team <linux-imx@nxp.com>,
Sean Wang <sean.wang@kernel.org>,
Lakshmi Sowjanya D <lakshmi.sowjanya.d@intel.com>,
Emil Renner Berthing <kernel@esmil.dk>,
Hal Feng <hal.feng@starfivetech.com>
Subject: Re: [PATCH v5 03/13] pinctrl: ingenic: Use C99 initializers in PINCTRL_PIN_GROUP()
Date: Wed, 13 Dec 2023 10:55:46 +0100 [thread overview]
Message-ID: <fb29c3bca8d245e3f7496539b7293aa4fc4bccd0.camel@crapouillou.net> (raw)
In-Reply-To: <20231211190321.307330-4-andriy.shevchenko@linux.intel.com>
Hi Andy,
Le lundi 11 décembre 2023 à 20:57 +0200, Andy Shevchenko a écrit :
> For the better flexibility use C99 initializers in
> PINCTRL_PIN_GROUP().
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/pinctrl/pinctrl-ingenic.c | 21 +++++++++++++--------
> 1 file changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-ingenic.c
> b/drivers/pinctrl/pinctrl-ingenic.c
> index ee718f6e2556..f5661dcdedf5 100644
> --- a/drivers/pinctrl/pinctrl-ingenic.c
> +++ b/drivers/pinctrl/pinctrl-ingenic.c
> @@ -82,16 +82,21 @@
> #define PINS_PER_GPIO_CHIP 32
> #define JZ4730_PINS_PER_PAIRED_REG 16
>
> -#define INGENIC_PIN_GROUP_FUNCS(name, id, funcs) \
> - { \
> - name, \
> - id##_pins, \
> - ARRAY_SIZE(id##_pins), \
> - funcs, \
> +#define INGENIC_PIN_GROUP_FUNCS(_name_, id,
> funcs) \
> + {
> \
> + .name =
> _name_, \
> + .pins =
> id##_pins, \
> + .num_pins =
> ARRAY_SIZE(id##_pins), \
> + .data =
> funcs, \
> }
>
> -#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?
Cheers,
-Paul
>
> enum jz_version {
> ID_JZ4730,
next prev parent reply other threads:[~2023-12-13 9:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 18:57 [PATCH v5 00/13] pinctrl: Convert struct group_desc to use struct pingroup Andy Shevchenko
2023-12-11 18:57 ` [PATCH v5 01/13] pinctrl: core: Add a convenient define PINCTRL_GROUP_DESC() Andy Shevchenko
2023-12-11 18:57 ` [PATCH v5 02/13] pinctrl: mediatek: Use C99 initializers in PINCTRL_PIN_GROUP() Andy Shevchenko
2023-12-11 18:57 ` [PATCH v5 03/13] pinctrl: ingenic: " Andy Shevchenko
2023-12-13 9:55 ` Paul Cercueil [this message]
2023-12-13 13:21 ` Andy Shevchenko
2023-12-17 14:43 ` Paul Cercueil
[not found] ` <ZYAhyWxh5sEyK1RC@smile.fi.intel.com>
2023-12-18 11:43 ` Paul Cercueil
2023-12-11 18:57 ` [PATCH v5 04/13] pinctrl: core: Embed struct pingroup into struct group_desc Andy Shevchenko
2023-12-11 18:57 ` [PATCH v5 05/13] pinctrl: bcm: Convert to use grp member Andy Shevchenko
2023-12-11 18:57 ` [PATCH v5 06/13] pinctrl: equilibrium: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 07/13] pinctrl: imx: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 08/13] pinctrl: ingenic: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 09/13] pinctrl: keembay: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 10/13] pinctrl: mediatek: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 11/13] pinctrl: renesas: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 12/13] pinctrl: starfive: " Andy Shevchenko
2023-12-11 18:58 ` [PATCH v5 13/13] pinctrl: core: Remove unused members from struct group_desc Andy Shevchenko
2023-12-11 23:48 ` [PATCH v5 00/13] pinctrl: Convert struct group_desc to use struct pingroup Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb29c3bca8d245e3f7496539b7293aa4fc4bccd0.camel@crapouillou.net \
--to=paul@crapouillou.net \
--cc=aisheng.dong@nxp.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=festevam@gmail.com \
--cc=geert+renesas@glider.be \
--cc=hal.feng@starfivetech.com \
--cc=jianlong.huang@starfivetech.com \
--cc=kernel@esmil.dk \
--cc=kernel@pengutronix.de \
--cc=lakshmi.sowjanya.d@intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=ping.bai@nxp.com \
--cc=rjui@broadcom.com \
--cc=s.hauer@pengutronix.de \
--cc=sbranden@broadcom.com \
--cc=sean.wang@kernel.org \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox