From: Mukesh Ojha <quic_mojha@quicinc.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Komal Bajaj <quic_kbajaj@quicinc.com>, <agross@kernel.org>,
<andersson@kernel.org>, <konrad.dybcio@linaro.org>,
<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<conor+dt@kernel.org>, <srinivas.kandagatla@linaro.org>
Cc: <linux-arm-msm@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/6] soc: qcom: llcc: Refactor llcc driver to support multiple configuration
Date: Thu, 10 Aug 2023 20:34:21 +0530 [thread overview]
Message-ID: <54d108d9-abfc-6b8e-7c1a-c93eef265575@quicinc.com> (raw)
In-Reply-To: <79ccb7c0-dc4b-87a7-3721-488f3ef3b192@linaro.org>
On 8/10/2023 5:52 PM, Bryan O'Donoghue wrote:
> On 10/08/2023 07:11, Komal Bajaj wrote:
>> + if (!cfgs || cfgs->num_config != DEF_NUM_CFG) {
>> + ret = -EINVAL;
>> + goto err;
>> + }
>> + cfg = &cfgs->llcc_config[DEF_NUM_CFG - 1];
>
> This is a bit of a redundant check.
>
> You add in the check for num_config != 1, then deref llc_config[0] but
> in patch #4 you get an index and check that index against num_config
I would take this blame on me to suggest this..,but i was trying to
avoid the hard-coding initially done for [1], now, num_config[2]
converted to ARRAY_SIZE(), i find no harm in checking
cfgs->num_config > DEF_NUM_CFG
since, anyways it will move to different function in #4.
[1]
https://lore.kernel.org/lkml/39b4bafd-410f-cae8-13ae-e18d751b51a2@quicinc.com/
[2]
.num_cfgs = 1,
-Mukesh
>
> I'm not seeing how at this point in your series, how num_config could be
> anything other than 1.
>
> I'd do away with the DEF_NUM_CFG define in this code/series completely.
>
> num_config should encode all the necessary detail we need, DEF_NUM_CFG
> just adds noise.
>
> ---
> bod
next prev parent reply other threads:[~2023-08-10 15:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 6:11 [PATCH 0/6] soc: qcom: llcc: Add support for QDU1000/QRU1000 Komal Bajaj
2023-08-10 6:11 ` [PATCH 1/6] dt-bindings: cache: qcom,llcc: Add LLCC compatible " Komal Bajaj
2023-08-10 7:20 ` Rob Herring
2023-08-10 10:27 ` Komal Bajaj
2023-08-10 16:36 ` Rob Herring
2023-08-10 6:11 ` [PATCH 2/6] soc: qcom: llcc: Refactor llcc driver to support multiple configuration Komal Bajaj
2023-08-10 12:22 ` Bryan O'Donoghue
2023-08-10 15:04 ` Mukesh Ojha [this message]
2023-08-24 8:56 ` Komal Bajaj
2023-08-10 6:11 ` [PATCH 3/6] nvmem: core: Add stub for nvmem_cell_read_u8 Komal Bajaj
2023-08-10 6:11 ` [PATCH 4/6] soc: qcom: Add LLCC support for multi channel DDR Komal Bajaj
2023-08-10 11:52 ` Bryan O'Donoghue
2023-08-10 12:32 ` Bryan O'Donoghue
2023-08-24 8:58 ` Komal Bajaj
2023-08-10 6:11 ` [PATCH 5/6] soc: qcom: llcc: Updating the macro name Komal Bajaj
2023-08-10 6:11 ` [PATCH 6/6] soc: qcom: llcc: Add QDU1000 and QRU1000 LLCC support Komal Bajaj
2023-08-10 14:45 ` [PATCH 0/6] soc: qcom: llcc: Add support for QDU1000/QRU1000 Mukesh Ojha
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=54d108d9-abfc-6b8e-7c1a-c93eef265575@quicinc.com \
--to=quic_mojha@quicinc.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_kbajaj@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.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
all inboxes | Powered by JetHome®