Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1656404
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table |
| Date | 2017-06-02 19:30 +0200 |
| Message-ID | <tNYyC-49F-19@gated-at.bofh.it> (permalink) |
| References | <tsdkZ-Vb-5@gated-at.bofh.it> <tsdkZ-Vb-3@gated-at.bofh.it> <tNWn8-2Pu-23@gated-at.bofh.it> <tNY5z-3Ka-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table Mark Rutland <mark.rutland@arm.com> - 2017-06-02 17:10 +0200
Re: [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table Hoan Tran <hotran@apm.com> - 2017-06-02 19:00 +0200
Re: [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table Mark Rutland <mark.rutland@arm.com> - 2017-06-02 19:30 +0200
Re: [PATCH v2 1/3] perf: xgene: Parse PMU subnode from the match table Hoan Tran <hotran@apm.com> - 2017-06-02 22:50 +0200
csiph-web