Message ID | 20181011123330.28329-1-vkoul@kernel.org |
---|---|
State | New |
Headers | show |
Series | pinctrl: qcom: constify tiles properly | expand |
On Thu 11 Oct 05:33 PDT 2018, Vinod Koul wrote: > compiler warns: > drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: > warning: initialization discards 'const' qualifier > from pointer target type [-Wdiscarded-qualifiers] > > The tiles are array of strings rightly defined as > "const char * const qcs404_tiles" so the member holding should also be > defined similarly. So update tiles to "const char * const *" > > Fixes: 1c1880fb7706 ("pinctrl: qcom: Support dispersed tiles") > Signed-off-by: Vinod Koul <vkoul@kernel.org> Thanks Vinod. Linus picked the same fix from Arnd last week, so we're good. https://lore.kernel.org/lkml/20181002211555.2779637-1-arnd@arndb.de/ 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..44ebf037ed4a 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.14.4 >
On 11-10-18, 07:36, Bjorn Andersson wrote: > On Thu 11 Oct 05:33 PDT 2018, Vinod Koul wrote: > > > compiler warns: > > drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: > > warning: initialization discards 'const' qualifier > > from pointer target type [-Wdiscarded-qualifiers] > > > > The tiles are array of strings rightly defined as > > "const char * const qcs404_tiles" so the member holding should also be > > defined similarly. So update tiles to "const char * const *" > > > > Fixes: 1c1880fb7706 ("pinctrl: qcom: Support dispersed tiles") > > Signed-off-by: Vinod Koul <vkoul@kernel.org> > > Thanks Vinod. > > Linus picked the same fix from Arnd last week, so we're good. Should have checked before sending, I will pick this up > https://lore.kernel.org/lkml/20181002211555.2779637-1-arnd@arndb.de/ -- ~Vinod
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.h b/drivers/pinctrl/qcom/pinctrl-msm.h index 0ad4bc55e2e1..44ebf037ed4a 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; };
compiler warns: drivers/pinctrl/qcom/pinctrl-qcs404.c:1660:11: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] The tiles are array of strings rightly defined as "const char * const qcs404_tiles" so the member holding should also be defined similarly. So update tiles to "const char * const *" Fixes: 1c1880fb7706 ("pinctrl: qcom: Support dispersed tiles") Signed-off-by: Vinod Koul <vkoul@kernel.org> --- drivers/pinctrl/qcom/pinctrl-msm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.14.4