[PATCH 1/2] clk: qcom: Constify qcom_cc_driver_data

Konrad Dybcio konrad.dybcio at oss.qualcomm.com
Tue Mar 31 02:33:36 PDT 2026


On 3/31/26 11:17 AM, Krzysztof Kozlowski wrote:
> The static 'struct qcom_cc_driver_data' contains probe match-like data
> and is not modified: neither by the driver defining it nor by common.c
> code using it.
> 
> Make it const for code safety and code readability.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at oss.qualcomm.com>
> ---

[...]

> --- a/drivers/clk/qcom/common.h
> +++ b/drivers/clk/qcom/common.h
> @@ -49,7 +49,7 @@ struct qcom_cc_desc {
>  	size_t num_icc_hws;
>  	unsigned int icc_first_node_id;
>  	bool use_rpm;
> -	struct qcom_cc_driver_data *driver_data;
> +	const struct qcom_cc_driver_data *driver_data;

This can be a const ptr to const data, even

Konrad



More information about the linux-arm-kernel mailing list