linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhou Yanjie <zhouyanjie@zoho.com>
To: Joe Perches <joe@perches.com>, Paul Cercueil <paul@crapouillou.net>
Cc: linus.walleij@linaro.org, linux-mips@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	paul.burton@mips.com, syq@debian.org, jiaxun.yang@flygoat.com,
	772753199@qq.com
Subject: Re: [PATCH RESEND 4/4] Pinctrl: Ingenic: Fix const declaration.
Date: Tue, 29 Jan 2019 12:06:02 +0800	[thread overview]
Message-ID: <5C4FD12A.2050005@zoho.com> (raw)
In-Reply-To: <c6de4935a2b3acdbcc9146af702322c58707c9f5.camel@perches.com>

I would prefer to keep it. There are many other drivers that also use 
this header file.

On 2019年01月29日 03:22, Joe Perches wrote:
> On Fri, 2019-01-25 at 14:59 -0300, Paul Cercueil wrote:
>> On Fri, Jan 25, 2019 at 6:59 AM, Zhou Yanjie <zhouyanjie@zoho.com>
>> wrote:
>>> Warning is reported when checkpatch indicates that
>>> "static const char * array" should be changed to
>>> "static const char * const".
> []
>>> diff --git a/drivers/pinctrl/pinctrl-ingenic.c
> []
>>> @@ -172,23 +172,25 @@ static const struct group_desc jz4740_groups[]
> []
>>> +static const char * const jz4740_mmc_groups[] = { "mmc-1bit",
>>> "mmc-4bit", };
>>>   static const struct function_desc jz4740_functions[] = {
>>>   	{ "mmc", jz4740_mmc_groups, ARRAY_SIZE(jz4740_mmc_groups), },
>> With this patch applied I get this:
>>
>> drivers/pinctrl/pinctrl-ingenic.c:196:11: attention : initialization
>> discards
>> ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>>    { "mmc", jz4740_mmc_groups, ARRAY_SIZE(jz4740_mmc_groups), },
>>             ^~~~~~~~~~~~~~~~~
> You could change group_names to const char * const group_names
> in pinmux.h
>
> ---
>   drivers/pinctrl/pinmux.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinmux.h b/drivers/pinctrl/pinmux.h
> index 3319535c76cb..2b903774ba5c 100644
> --- a/drivers/pinctrl/pinmux.h
> +++ b/drivers/pinctrl/pinmux.h
> @@ -122,7 +122,7 @@ static inline void pinmux_init_device_debugfs(struct dentry *devroot,
>    */
>   struct function_desc {
>   	const char *name;
> -	const char **group_names;
> +	const char * const *group_names;
>   	int num_group_names;
>   	void *data;
>   };
>
>




  reply	other threads:[~2019-01-29  4:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-25  9:59 Ingenic pinctrl fixes Zhou Yanjie
2019-01-25  9:59 ` [PATCH RESEND 1/4] Pinctrl: Ingenic: Fix bugs caused by differences between JZ4770 and JZ4780 Zhou Yanjie
2019-01-28 13:59   ` Linus Walleij
2019-01-28 14:42     ` Zhou Yanjie
2019-01-28 14:47       ` Linus Walleij
2019-01-25  9:59 ` [PATCH RESEND 2/4] Pinctrl: Ingenic: Add missing parts for " Zhou Yanjie
2019-01-25  9:59 ` [PATCH RESEND 3/4] Pinctrl: Ingenic: Unify the function name prefix to "ingenic_gpio_" Zhou Yanjie
2019-01-25  9:59 ` [PATCH RESEND 4/4] Pinctrl: Ingenic: Fix const declaration Zhou Yanjie
2019-01-25 17:59   ` Paul Cercueil
2019-01-26  8:23     ` Zhou Yanjie
2019-01-28 19:22     ` Joe Perches
2019-01-29  4:06       ` Zhou Yanjie [this message]
2019-01-28 15:19 ` Ingenic pinctrl fixes Zhou Yanjie
2019-01-28 15:19   ` [PATCH v2 1/3] Pinctrl: Ingenic: Fix bugs caused by differences between JZ4770 and JZ4780 Zhou Yanjie
2019-01-28 18:17     ` Paul Cercueil
2019-01-30  9:28     ` Linus Walleij
2019-01-28 15:19   ` [PATCH v2 2/3] Pinctrl: Ingenic: Add missing parts for " Zhou Yanjie
2019-01-28 18:13     ` Paul Cercueil
2019-01-30  9:30     ` Linus Walleij
2019-01-28 15:19   ` [PATCH v2 3/3] Pinctrl: Ingenic: Unify the function name prefix to "ingenic_gpio_" Zhou Yanjie
2019-01-28 18:18     ` Paul Cercueil
2019-01-30  9:31     ` 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=5C4FD12A.2050005@zoho.com \
    --to=zhouyanjie@zoho.com \
    --cc=772753199@qq.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=joe@perches.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=paul.burton@mips.com \
    --cc=paul@crapouillou.net \
    --cc=syq@debian.org \
    --subject='Re: [PATCH RESEND 4/4] Pinctrl: Ingenic: Fix const declaration.' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).