* [PATCH] pinctrl: qcom: fix 'const' pointer handling
@ 2018-10-02 21:15 Arnd Bergmann
2018-10-02 22:53 ` Bjorn Andersson
2018-10-03 7:12 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-10-02 21:15 UTC (permalink / raw)
To: Bjorn Andersson, Linus Walleij
Cc: Arnd Bergmann, linux-arm-msm, linux-gpio, linux-kernel
The 'tiles' array is initialized to a constant pointers to constant
strings, but the declaration is only half as constant:
drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
drivers/pinctrl/qcom/pinctrl-sdm660.c:1417:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
Let's make it more constant.
Fixes: 22eb8301dbc1 ("pinctrl: qcom: Add qcs404 pinctrl driver")
Fixes: a46d5e98190d ("pinctrl: qcom: Support dispersed tiles")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pinctrl/qcom/pinctrl-msm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.h b/drivers/pinctrl/qcom/pinctrl-msm.h
index 0ad4bc55e2e1..29172fdf5882 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.h
+++ b/drivers/pinctrl/qcom/pinctrl-msm.h
@@ -119,7 +119,7 @@ struct msm_pinctrl_soc_data {
unsigned ngroups;
unsigned ngpios;
bool pull_no_keeper;
- const char **tiles;
+ const char *const *tiles;
unsigned int ntiles;
};
--
2.18.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: qcom: fix 'const' pointer handling
2018-10-02 21:15 [PATCH] pinctrl: qcom: fix 'const' pointer handling Arnd Bergmann
@ 2018-10-02 22:53 ` Bjorn Andersson
2018-10-03 7:12 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2018-10-02 22:53 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Linus Walleij, linux-arm-msm, linux-gpio, linux-kernel
On Tue 02 Oct 14:15 PDT 2018, Arnd Bergmann wrote:
> The 'tiles' array is initialized to a constant pointers to constant
> strings, but the declaration is only half as constant:
>
> drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
> drivers/pinctrl/qcom/pinctrl-sdm660.c:1417:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>
> Let's make it more constant.
>
> Fixes: 22eb8301dbc1 ("pinctrl: qcom: Add qcs404 pinctrl driver")
> Fixes: a46d5e98190d ("pinctrl: qcom: Support dispersed tiles")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Not sure why my compiler doesn't complain about this, thanks for the fix
Arnd.
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/pinctrl/qcom/pinctrl-msm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.h b/drivers/pinctrl/qcom/pinctrl-msm.h
> index 0ad4bc55e2e1..29172fdf5882 100644
> --- a/drivers/pinctrl/qcom/pinctrl-msm.h
> +++ b/drivers/pinctrl/qcom/pinctrl-msm.h
> @@ -119,7 +119,7 @@ struct msm_pinctrl_soc_data {
> unsigned ngroups;
> unsigned ngpios;
> bool pull_no_keeper;
> - const char **tiles;
> + const char *const *tiles;
> unsigned int ntiles;
> };
>
> --
> 2.18.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: qcom: fix 'const' pointer handling
2018-10-02 21:15 [PATCH] pinctrl: qcom: fix 'const' pointer handling Arnd Bergmann
2018-10-02 22:53 ` Bjorn Andersson
@ 2018-10-03 7:12 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-10-03 7:12 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Bjorn Andersson, linux-arm-msm, open list:GPIO SUBSYSTEM, linux-kernel
On Tue, Oct 2, 2018 at 11:15 PM Arnd Bergmann <arnd@arndb.de> wrote:
> The 'tiles' array is initialized to a constant pointers to constant
> strings, but the declaration is only half as constant:
>
> drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
> drivers/pinctrl/qcom/pinctrl-sdm660.c:1417:11: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>
> Let's make it more constant.
>
> Fixes: 22eb8301dbc1 ("pinctrl: qcom: Add qcs404 pinctrl driver")
> Fixes: a46d5e98190d ("pinctrl: qcom: Support dispersed tiles")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied with Bjorn's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-03 7:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 21:15 [PATCH] pinctrl: qcom: fix 'const' pointer handling Arnd Bergmann
2018-10-02 22:53 ` Bjorn Andersson
2018-10-03 7:12 ` Linus Walleij
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).