From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table
Date: Fri, 2 Jun 2017 18:23:56 +0100 [thread overview]
Message-ID: <20170602172355.GO28299@leverpostej> (raw)
In-Reply-To: <CAFHUOYwYU4TTLWODX0=15uwDGusdydcX_s8G_Ji81N0c+Bkdqg@mail.gmail.com>
On Fri, Jun 02, 2017 at 09:54:32AM -0700, Hoan Tran wrote:
> On Fri, Jun 2, 2017 at 7:59 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Mon, Apr 03, 2017 at 09:47:55AM -0700, Hoan Tran wrote:
> >> +static const struct acpi_device_id *xgene_pmu_acpi_match_type(
> >> + const struct acpi_device_id *ids,
> >> + struct acpi_device *adev)
> >> +{
> >> + const struct acpi_device_id *match_id = NULL;
> >> + const struct acpi_device_id *id;
> >> +
> >> + for (id = ids; id->id[0] || id->cls; id++) {
> >> + if (!acpi_match_device_ids(adev, id))
> >> + match_id = id;
> >> + else if (match_id)
> >> + break;
> >> + }
> >> +
> >> + return match_id;
> >> +}
> >
> > I don't believe this look is necessary. AFAICT, acpi_match_device_ids()
> > already iterates over the id table it is given.
>
> The acpi_match_device_ids() function just returns if a device ID is
> available on the given list. It does not return the first matching ID.
> That's the reason I created this function to find the first matching ID.
Ah, I see. Thanks for correcting me!
Can we use acpi_match_device(ids, &adev->dev), or is that the wrong dev?
Thanks,
Mark.
next prev parent reply other threads:[~2017-06-02 17:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 16:47 [PATCH v2 0/3] perf: xgene: Add support for SoC PMU version 3 Hoan Tran
2017-04-03 16:47 ` [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table Hoan Tran
2017-06-02 14:59 ` Mark Rutland
2017-06-02 16:54 ` Hoan Tran
2017-06-02 17:23 ` Mark Rutland [this message]
2017-06-02 20:41 ` Hoan Tran
2017-04-03 16:47 ` [PATCH v2 2/3] perf: xgene: Move PMU leaf functions into function pointer structure Hoan Tran
2017-04-03 16:47 ` [PATCH v2 3/3] perf: xgene: Add support for SoC PMU version 3 Hoan Tran
2017-06-02 16:04 ` Mark Rutland
2017-06-02 21:02 ` Hoan Tran
2017-04-17 16:36 ` [PATCH v2 0/3] " Hoan Tran
[not found] ` <CAFHUOYzJ1PoUV=BmcVxSHZ_8qENm6DW5_Hd3uuFHE9kdqhXCzA@mail.gmail.com>
2017-05-05 15:48 ` Hoan Tran
2017-05-30 17:29 ` Hoan Tran
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=20170602172355.GO28299@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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