* [PATCH] perf: Replace acpi_bus_get_device()
@ 2022-02-01 19:10 Rafael J. Wysocki
2022-02-08 14:59 ` Will Deacon
2022-02-08 16:21 ` Will Deacon
0 siblings, 2 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-02-01 19:10 UTC (permalink / raw)
To: Will Deacon, Mark Rutland; +Cc: Khuong Dinh, LKML, Linux ACPI, linux-arm-kernel
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Replace acpi_bus_get_device() that is going to be dropped with
acpi_fetch_acpi_dev().
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/perf/thunderx2_pmu.c | 6 ++----
drivers/perf/xgene_pmu.c | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
Index: linux-pm/drivers/perf/thunderx2_pmu.c
===================================================================
--- linux-pm.orig/drivers/perf/thunderx2_pmu.c
+++ linux-pm/drivers/perf/thunderx2_pmu.c
@@ -887,13 +887,11 @@ static struct tx2_uncore_pmu *tx2_uncore
static acpi_status tx2_uncore_pmu_add(acpi_handle handle, u32 level,
void *data, void **return_value)
{
+ struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
struct tx2_uncore_pmu *tx2_pmu;
- struct acpi_device *adev;
enum tx2_uncore_type type;
- if (acpi_bus_get_device(handle, &adev))
- return AE_OK;
- if (acpi_bus_get_status(adev) || !adev->status.present)
+ if (!adev || acpi_bus_get_status(adev) || !adev->status.present)
return AE_OK;
type = get_tx2_pmu_type(adev);
Index: linux-pm/drivers/perf/xgene_pmu.c
===================================================================
--- linux-pm.orig/drivers/perf/xgene_pmu.c
+++ linux-pm/drivers/perf/xgene_pmu.c
@@ -1549,14 +1549,12 @@ static const struct acpi_device_id *xgen
static acpi_status acpi_pmu_dev_add(acpi_handle handle, u32 level,
void *data, void **return_value)
{
+ struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
const struct acpi_device_id *acpi_id;
struct xgene_pmu *xgene_pmu = data;
struct xgene_pmu_dev_ctx *ctx;
- struct acpi_device *adev;
- if (acpi_bus_get_device(handle, &adev))
- return AE_OK;
- if (acpi_bus_get_status(adev) || !adev->status.present)
+ if (!adev || acpi_bus_get_status(adev) || !adev->status.present)
return AE_OK;
acpi_id = xgene_pmu_acpi_match_type(xgene_pmu_acpi_type_match, adev);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: Replace acpi_bus_get_device()
2022-02-01 19:10 [PATCH] perf: Replace acpi_bus_get_device() Rafael J. Wysocki
@ 2022-02-08 14:59 ` Will Deacon
2022-02-08 15:09 ` Rafael J. Wysocki
2022-02-08 16:21 ` Will Deacon
1 sibling, 1 reply; 4+ messages in thread
From: Will Deacon @ 2022-02-08 14:59 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Mark Rutland, Khuong Dinh, LKML, Linux ACPI, linux-arm-kernel
Hi Rafael,
On Tue, Feb 01, 2022 at 08:10:01PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Replace acpi_bus_get_device() that is going to be dropped with
> acpi_fetch_acpi_dev().
>
> No intentional functional impact.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/perf/thunderx2_pmu.c | 6 ++----
> drivers/perf/xgene_pmu.c | 6 ++----
> 2 files changed, 4 insertions(+), 8 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Please let me know if you'd like me to take this for 5.18.
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: Replace acpi_bus_get_device()
2022-02-08 14:59 ` Will Deacon
@ 2022-02-08 15:09 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2022-02-08 15:09 UTC (permalink / raw)
To: Will Deacon
Cc: Rafael J. Wysocki, Mark Rutland, Khuong Dinh, LKML, Linux ACPI,
Linux ARM
On Tue, Feb 8, 2022 at 3:59 PM Will Deacon <will@kernel.org> wrote:
>
> Hi Rafael,
>
> On Tue, Feb 01, 2022 at 08:10:01PM +0100, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > Replace acpi_bus_get_device() that is going to be dropped with
> > acpi_fetch_acpi_dev().
> >
> > No intentional functional impact.
> >
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > ---
> > drivers/perf/thunderx2_pmu.c | 6 ++----
> > drivers/perf/xgene_pmu.c | 6 ++----
> > 2 files changed, 4 insertions(+), 8 deletions(-)
>
> Acked-by: Will Deacon <will@kernel.org>
>
> Please let me know if you'd like me to take this for 5.18.
Yes, please!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf: Replace acpi_bus_get_device()
2022-02-01 19:10 [PATCH] perf: Replace acpi_bus_get_device() Rafael J. Wysocki
2022-02-08 14:59 ` Will Deacon
@ 2022-02-08 16:21 ` Will Deacon
1 sibling, 0 replies; 4+ messages in thread
From: Will Deacon @ 2022-02-08 16:21 UTC (permalink / raw)
To: Rafael J. Wysocki, Mark Rutland
Cc: catalin.marinas, kernel-team, Will Deacon, LKML, Khuong Dinh,
linux-arm-kernel, Linux ACPI
On Tue, 01 Feb 2022 20:10:01 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Replace acpi_bus_get_device() that is going to be dropped with
> acpi_fetch_acpi_dev().
>
> No intentional functional impact.
>
> [...]
Applied to will (for-next/perf), thanks!
[1/1] perf: Replace acpi_bus_get_device()
https://git.kernel.org/will/c/602c873eb52e
Cheers,
--
Will
https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-02-08 16:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 19:10 [PATCH] perf: Replace acpi_bus_get_device() Rafael J. Wysocki
2022-02-08 14:59 ` Will Deacon
2022-02-08 15:09 ` Rafael J. Wysocki
2022-02-08 16:21 ` Will Deacon
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).