* [PATCH 1/7] drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs
@ 2018-07-19 7:13 Raju P L S S S N
2018-07-19 8:15 ` Raju P L S S S N
0 siblings, 1 reply; 2+ messages in thread
From: Raju P L S S S N @ 2018-07-19 7:13 UTC (permalink / raw)
To: andy.gross, david.brown, linux-arm-msm, linux-soc
Cc: rnayak, bjorn.andersson, linux-kernel, sboyd, evgreen, dianders,
mka, ilina, Raju P.L.S.S.S.N
From: "Raju P.L.S.S.S.N" <rplsssn@codeaurora.org>
get_req_from_tcs introduced in patch[1] returns tcs_request from
tcs_group. The size of tcs (of type - tcs_group) array in rsc_drv is
TCS_TYPE_NR. So the loop index needs to be iterated up to TCS_TYPE_NR only.
[1] https://patchwork.kernel.org/patch/10477547/
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
---
drivers/soc/qcom/rpmh-rsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
index fefda0f..33fe9f9 100644
--- a/drivers/soc/qcom/rpmh-rsc.c
+++ b/drivers/soc/qcom/rpmh-rsc.c
@@ -190,7 +190,7 @@ static const struct tcs_request *get_req_from_tcs(struct rsc_drv *drv,
struct tcs_group *tcs;
int i;
- for (i = 0; i < drv->num_tcs; i++) {
+ for (i = 0; i < TCS_TYPE_NR; i++) {
tcs = &drv->tcs[i];
if (tcs->mask & BIT(tcs_id))
return tcs->req[tcs_id - tcs->offset];
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/7] drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs
2018-07-19 7:13 [PATCH 1/7] drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs Raju P L S S S N
@ 2018-07-19 8:15 ` Raju P L S S S N
0 siblings, 0 replies; 2+ messages in thread
From: Raju P L S S S N @ 2018-07-19 8:15 UTC (permalink / raw)
To: andy.gross, david.brown, linux-arm-msm, linux-soc
Cc: rnayak, bjorn.andersson, linux-kernel, sboyd, evgreen, dianders,
mka, ilina
Hi all,
This is an independent patch and not part of patch set. There was some
issue while sending the patch using git send-email. Please ignore 1/7 in
the mail subject. Sorry for multiple mails.
Thanks,
Raju.
On 7/19/2018 12:43 PM, Raju P L S S S N wrote:
> From: "Raju P.L.S.S.S.N" <rplsssn@codeaurora.org>
>
> get_req_from_tcs introduced in patch[1] returns tcs_request from
> tcs_group. The size of tcs (of type - tcs_group) array in rsc_drv is
> TCS_TYPE_NR. So the loop index needs to be iterated up to TCS_TYPE_NR only.
>
> [1] https://patchwork.kernel.org/patch/10477547/
>
> Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
> ---
> drivers/soc/qcom/rpmh-rsc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
> index fefda0f..33fe9f9 100644
> --- a/drivers/soc/qcom/rpmh-rsc.c
> +++ b/drivers/soc/qcom/rpmh-rsc.c
> @@ -190,7 +190,7 @@ static const struct tcs_request *get_req_from_tcs(struct rsc_drv *drv,
> struct tcs_group *tcs;
> int i;
>
> - for (i = 0; i < drv->num_tcs; i++) {
> + for (i = 0; i < TCS_TYPE_NR; i++) {
> tcs = &drv->tcs[i];
> if (tcs->mask & BIT(tcs_id))
> return tcs->req[tcs_id - tcs->offset];
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-19 8:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 7:13 [PATCH 1/7] drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs Raju P L S S S N
2018-07-19 8:15 ` Raju P L S S S N
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).