lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Jan 2019 12:06:02 +0800
From:   Zhou Yanjie <zhouyanjie@...o.com>
To:     Joe Perches <joe@...ches.com>, Paul Cercueil <paul@...pouillou.net>
Cc:     linus.walleij@...aro.org, linux-mips@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org,
        paul.burton@...s.com, syq@...ian.org, jiaxun.yang@...goat.com,
        772753199@...com
Subject: Re: [PATCH RESEND 4/4] Pinctrl: Ingenic: Fix const declaration.

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@...o.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;
>   };
>
>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ