[PATCH v4 1/8] clk: qcom: ipq5332: add const qualifier to the clk_init_data structure

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Mon Jan 22 01:02:58 PST 2024


On 22/01/2024 06:56, Kathiravan Thirumoorthy wrote:
> There are few places where clk_init_data structure doesn't carry the const
> qualifier. Let's add the same.

And why should they carry const?

> 
> Acked-by: Konrad Dybcio <konrad.dybcio at linaro.org>
> Signed-off-by: Kathiravan Thirumoorthy <quic_kathirav at quicinc.com>
> ---
>  drivers/clk/qcom/gcc-ipq5332.c | 38 +++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/clk/qcom/gcc-ipq5332.c b/drivers/clk/qcom/gcc-ipq5332.c
> index f98591148a97..66d5399798fe 100644
> --- a/drivers/clk/qcom/gcc-ipq5332.c
> +++ b/drivers/clk/qcom/gcc-ipq5332.c
> @@ -65,7 +65,7 @@ static struct clk_alpha_pll gpll0_main = {
>  static struct clk_fixed_factor gpll0_div2 = {
>  	.mult = 1,
>  	.div = 2,
> -	.hw.init = &(struct clk_init_data) {
> +	.hw.init = &(const struct clk_init_data) {

This is a cast, why do you need const? What does it even change?

Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list