Re: [PATCH v2] clk: qcom: Constify qcom_cc_driver_data and list of critical CBCR registers

From: Vladimir Zapolskiy

Date: Thu Apr 30 2026 - 10:37:03 EST


On 4/30/26 17:05, Krzysztof Kozlowski wrote:
On 30/04/2026 15:03, Vladimir Zapolskiy wrote:
On 4/29/26 20:09, Krzysztof Kozlowski wrote:
The static 'struct qcom_cc_driver_data' and array 'xxx_critical_cbcrs'
are already treated by common.c code as pointers to const, so constify
few remaining pieces.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>

---

Changes in v2:
1. Constify also nw_gcc_nord_critical_cbcrs (Sashiko)
2. Add rb tag
---
drivers/clk/qcom/gcc-nord.c | 2 +-
drivers/clk/qcom/gpucc-sm8750.c | 4 ++--
drivers/clk/qcom/negcc-nord.c | 2 +-
drivers/clk/qcom/nwgcc-nord.c | 4 ++--
drivers/clk/qcom/segcc-nord.c | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)

What's about constifying video_cc_sm8550_driver_data from videocc-sm8550.c?


It's on my exception list, not sure what would be the benefit in practice.


The benefit is just the same as the one described in the commit message,
having such a peculiar exception left makes the commit message statement
"constify few remaining pieces" imprecise, and if it's done deliberately,
then it should be explained why it's done so in the commit message.

--
Best wishes,
Vladimir