All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Mark Brown <broonie@kernel.org>,
	Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Linux on Hyper-V List <linux-hyperv@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	USB <linux-usb@vger.kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>
Subject: Re: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device
Date: Wed, 24 Aug 2022 21:23:16 +0300	[thread overview]
Message-ID: <CAHp75VcjxUjH4p_NOEQjOuFO8LcSdUU_stEvfWvtbQc8hfud0w@mail.gmail.com> (raw)
In-Reply-To: <5857822.lOV4Wx5bFT@kreacher>

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

-- 
With Best Regards,
Andy Shevchenko

WARNING: multiple messages have this Message-ID (diff)
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Linux PM <linux-pm@vger.kernel.org>,
	 "K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	 Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>,  Dexuan Cui <decui@microsoft.com>,
	Mark Brown <broonie@kernel.org>,
	 Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	 Mika Westerberg <mika.westerberg@linux.intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	 Linux on Hyper-V List <linux-hyperv@vger.kernel.org>,
	linux-spi <linux-spi@vger.kernel.org>,
	 USB <linux-usb@vger.kernel.org>,
	 linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	 linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Will Deacon <will@kernel.org>,
	 Mark Rutland <mark.rutland@arm.com>,
	Andy Gross <agross@kernel.org>,
	 Bjorn Andersson <bjorn.andersson@linaro.org>,
	Konrad Dybcio <konrad.dybcio@somainline.org>
Subject: Re: [PATCH v2 5/5] ACPI: Drop parent field from struct acpi_device
Date: Wed, 24 Aug 2022 21:23:16 +0300	[thread overview]
Message-ID: <CAHp75VcjxUjH4p_NOEQjOuFO8LcSdUU_stEvfWvtbQc8hfud0w@mail.gmail.com> (raw)
In-Reply-To: <5857822.lOV4Wx5bFT@kreacher>

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

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-08-24 18:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 16:11 [PATCH v1 0/5] ACPI: Device enumeration rearrangements and parent field elimination Rafael J. Wysocki
2022-08-10 16:14 ` [PATCH v1 1/5] ACPI: Rename acpi_bus_get/put_acpi_device() Rafael J. Wysocki
2022-08-10 16:30   ` Guenter Roeck
2022-08-10 16:15 ` [PATCH v1 2/5] ACPI: scan: Rename acpi_bus_get_parent() and rearrange it Rafael J. Wysocki
2022-08-12 13:08   ` Punit Agrawal
2022-08-10 16:16 ` [PATCH v1 3/5] ACPI: scan: Rearrange initialization of ACPI device objects Rafael J. Wysocki
2022-08-10 16:17 ` [PATCH v1 4/5] ACPI: scan: Eliminate __acpi_device_add() Rafael J. Wysocki
2022-08-10 16:23 ` [PATCH v1 5/5][RFT] ACPI: Drop parent field from struct acpi_device Rafael J. Wysocki
2022-08-10 16:33   ` Mark Brown
2022-08-10 17:10   ` Mika Westerberg
2022-08-12 15:14   ` Wei Liu
2022-08-24 16:59   ` [PATCH v2 5/5] " Rafael J. Wysocki
2022-08-24 16:59     ` Rafael J. Wysocki
2022-08-24 18:23     ` Andy Shevchenko [this message]
2022-08-24 18:23       ` Andy Shevchenko
2022-08-24 18:34       ` Rafael J. Wysocki
2022-08-24 18:34         ` Rafael J. Wysocki
2022-08-27 13:19     ` Hanjun Guo
2022-08-27 13:19       ` Hanjun Guo
2022-08-29 15:54       ` Rafael J. Wysocki
2022-08-29 15:54         ` Rafael J. Wysocki
2022-08-30 21:29     ` Michael Kelley (LINUX)
2022-08-30 21:29       ` Michael Kelley (LINUX)
2022-08-12 13:11 ` [PATCH v1 0/5] ACPI: Device enumeration rearrangements and parent field elimination Punit Agrawal
2022-08-23 16:25   ` Rafael J. Wysocki
2022-08-29 15:21 ` [PATCH v1] ACPI: PM: Fix NULL argument handling in acpi_device_get/set_power() Rafael J. Wysocki
2022-08-29 15:53 ` [PATCH v1] ACPI: Drop redundant acpi_dev_parent() header Rafael J. Wysocki
2022-08-30  2:17   ` Hanjun Guo

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=CAHp75VcjxUjH4p_NOEQjOuFO8LcSdUU_stEvfWvtbQc8hfud0w@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=YehezkelShB@gmail.com \
    --cc=agross@kernel.org \
    --cc=andreas.noever@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=kys@microsoft.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.