From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Walleij <linus.walleij@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: qcom: fix 'const' pointer handling
Date: Tue, 2 Oct 2018 15:53:12 -0700 [thread overview]
Message-ID: <20181002225312.GQ2523@minitux> (raw)
In-Reply-To: <20181002211555.2779637-1-arnd@arndb.de>
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
>
next prev parent reply other threads:[~2018-10-02 22:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 21:15 [PATCH] pinctrl: qcom: fix 'const' pointer handling Arnd Bergmann
2018-10-02 22:53 ` Bjorn Andersson [this message]
2018-10-03 7:12 ` 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=20181002225312.GQ2523@minitux \
--to=bjorn.andersson@linaro.org \
--cc=arnd@arndb.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.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