From: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] clk: qcom: Constify qcom_cc_driver_data
Date: Tue, 31 Mar 2026 12:13:09 +0200 [thread overview]
Message-ID: <445a53e3-f467-40fc-9b01-dc776555c3fb@oss.qualcomm.com> (raw)
In-Reply-To: <51a05279-1759-4c03-8bba-835a9e972ccb@oss.qualcomm.com>
On 31/03/2026 12:10, Konrad Dybcio wrote:
> On 3/31/26 12:09 PM, Krzysztof Kozlowski wrote:
>> On 31/03/2026 11:33, Konrad Dybcio wrote:
>>> 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@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
>>
>> None of other elements in 'qcom_cc_desc' is const pointer, even though
>> they also could. If doing this change, let's make it consistent - so
>> shall all of them be const?
>
> I thought about it, but then it turns out that videocc-sm8550.c has:
>
> video_cc_sm8550_driver_data.clk_cbcrs = video_cc_sm8650_critical_cbcrs
>
> So we'd have to duplicate the entire struct
No, that's not a problem. Pointer is not modified and we speak here
about const pointer.
Best regards,
Krzysztof
next prev parent reply other threads:[~2026-03-31 10:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-31 9:17 [PATCH 1/2] clk: qcom: Constify qcom_cc_driver_data Krzysztof Kozlowski
2026-03-31 9:17 ` [PATCH 2/2] clk: qcom: Constify list of critical CBCR registers Krzysztof Kozlowski
2026-03-31 10:30 ` Konrad Dybcio
2026-03-31 10:44 ` Vladimir Zapolskiy
2026-03-31 9:33 ` [PATCH 1/2] clk: qcom: Constify qcom_cc_driver_data Konrad Dybcio
2026-03-31 10:09 ` Krzysztof Kozlowski
2026-03-31 10:10 ` Konrad Dybcio
2026-03-31 10:13 ` Krzysztof Kozlowski [this message]
2026-03-31 10:17 ` Konrad Dybcio
2026-03-31 10:20 ` Krzysztof Kozlowski
2026-03-31 10:30 ` Konrad Dybcio
2026-03-31 10:43 ` Vladimir Zapolskiy
2026-04-05 19:40 ` (subset) " Bjorn Andersson
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=445a53e3-f467-40fc-9b01-dc776555c3fb@oss.qualcomm.com \
--to=krzysztof.kozlowski@oss.qualcomm.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andersson@kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@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