From: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"kernel test robot" <lkp@intel.com>
Subject: Re: [PATCH] pinctrl: nuvoton: Fix sparse warning
Date: Wed, 23 Mar 2022 02:58:31 +0100 [thread overview]
Message-ID: <Yjp+x5QWhT//1oT8@latitude> (raw)
In-Reply-To: <20220322231604.491272-1-linus.walleij@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1566 bytes --]
On Wed, Mar 23, 2022 at 12:16:04AM +0100, Linus Walleij wrote:
> Sparse complains:
> drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:626:9:
> sparse: sparse: obsolete array initializer, use C99 syntax
>
> This is because no equal sign is between the array index
> and the assignments, in the macro.
>
> Fix it up.
>
> Cc: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
Sounds good to me, thanks!
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> index 661aa963e3fc..1402840af11f 100644
> --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> @@ -613,8 +613,8 @@ static struct wpcm450_func wpcm450_funcs[] = {
> };
>
> #define WPCM450_PINCFG(a, b, c, d, e, f, g) \
> - [a] { .fn0 = fn_ ## b, .reg0 = WPCM450_GCR_ ## c, .bit0 = d, \
> - .fn1 = fn_ ## e, .reg1 = WPCM450_GCR_ ## f, .bit1 = g }
> + [a] = { .fn0 = fn_ ## b, .reg0 = WPCM450_GCR_ ## c, .bit0 = d, \
> + .fn1 = fn_ ## e, .reg1 = WPCM450_GCR_ ## f, .bit1 = g }
You will find the same in the pinctrl-npcm7xx driver:
#define NPCM7XX_PINCFG(a, b, c, d, e, f, g, h, i, j, k) \
[a] { .fn0 = fn_ ## b, .reg0 = NPCM7XX_GCR_ ## c, .bit0 = d, /*...*/ }
Jonathan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2022-03-23 1:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-22 23:16 [PATCH] pinctrl: nuvoton: Fix sparse warning Linus Walleij
2022-03-23 1:58 ` Jonathan Neuschäfer [this message]
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=Yjp+x5QWhT//1oT8@latitude \
--to=j.neuschaefer@gmx.net \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=lkp@intel.com \
/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