From: Mark Rutland <mark.rutland@arm.com>
To: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
will@kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, jeremy.linton@arm.com,
renyu.zj@linux.alibaba.com
Subject: Re: [PATCH 2/3] perf/arm-cmn: Rework DTC counters (again)
Date: Mon, 23 Oct 2023 10:06:17 +0100 [thread overview]
Message-ID: <ZTY3ieLQaRQ4dHYP@FVFF77S0Q05N> (raw)
In-Reply-To: <8e179525-bba-c577-85cf-4aa0a7af436@os.amperecomputing.com>
On Fri, Oct 20, 2023 at 03:50:30PM -0700, Ilkka Koskinen wrote:
> Hi Robin,
>
> I have one comment, otherwise the patch looks good to me.
> > +/* @i is the DTC number, @idx is the counter index on that DTC */
> > +#define for_each_hw_dtc_idx(hw, i, idx) \
> > + for (int i = 0, idx; i < CMN_MAX_DTCS; i++) if ((idx = hw->dtc_idx[i]) >= 0)
>
> Isn't that "idx" unnecessary in the initialization?
That creates the 'idx' variable that's assigned to by `idx = hw->dtc_idx[i]`,
so that is necessary.
Mark.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-10-23 9:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 17:51 [PATCH 0/3] perf/arm-cmn: Multi-DTC improvements Robin Murphy
2023-10-20 17:51 ` [PATCH 1/3] perf/arm-cmn: Fix DTC domain detection Robin Murphy
2023-10-20 22:45 ` Ilkka Koskinen
2023-10-20 17:51 ` [PATCH 2/3] perf/arm-cmn: Rework DTC counters (again) Robin Murphy
2023-10-20 22:50 ` Ilkka Koskinen
2023-10-23 9:06 ` Mark Rutland [this message]
2023-10-23 14:14 ` Robin Murphy
2023-10-25 3:18 ` Ilkka Koskinen
2023-10-20 22:53 ` Ilkka Koskinen
2023-10-23 10:26 ` Will Deacon
2023-10-20 17:51 ` [PATCH 3/3] perf/arm-cmn: Enable per-DTC counter allocation Robin Murphy
2023-10-20 23:00 ` Ilkka Koskinen
2023-10-23 14:39 ` [PATCH 0/3] perf/arm-cmn: Multi-DTC improvements Will Deacon
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=ZTY3ieLQaRQ4dHYP@FVFF77S0Q05N \
--to=mark.rutland@arm.com \
--cc=ilkka@os.amperecomputing.com \
--cc=jeremy.linton@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=renyu.zj@linux.alibaba.com \
--cc=robin.murphy@arm.com \
--cc=will@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