lkml.org 
[lkml]   [2022]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device
On Wed, Aug 24, 2022 at 8:23 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, Aug 24, 2022 at 8:13 PM Rafael J. Wysocki <rjw@rjwysocki.net> wrote:
> >
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > The parent field in struct acpi_device is, in fact, redundant,
> > because the dev.parent field in it effectively points to the same
> > object and it is used by the driver core.
> >
> > Accordingly, the parent field can be dropped from struct acpi_device
> > and for this purpose define acpi_dev_parent() to retrieve a parent
> > struct acpi_device pointer from the dev.parent field in struct
> > acpi_device. Next, update all of the users of the parent field
> > in struct acpi_device to use acpi_dev_parent() instead of it and
> > drop it.
> >
> > While at it, drop the ACPI_IS_ROOT_DEVICE() macro that is only used
> > in one place in a confusing way.
> >
> > No intentional functional impact.
>
> Side note: Should we not convert these to use acpi_dev_parent()?
>
> https://elixir.bootlin.com/linux/v6.0-rc2/source/drivers/acpi/property.c#L1271
> https://elixir.bootlin.com/linux/v6.0-rc2/source/drivers/bus/hisi_lpc.c#L397

That can be done later, but thanks for the pointers!

\
 
 \ /
  Last update: 2022-08-24 20:35    [W:0.077 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site