From: Andrew Lunn <andrew@lunn.ch>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Sunil Goutham <sgoutham@marvell.com>,
Iyappan Subramanian <iyappan@os.amperecomputing.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Keyur Chudgar <keyur@os.amperecomputing.com>,
Quan Nguyen <quan@os.amperecomputing.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Linux ACPI <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH] drivers: net: Replace acpi_bus_get_device()
Date: Tue, 1 Feb 2022 20:27:22 +0100 [thread overview]
Message-ID: <YfmJmgE/KuS8G92w@lunn.ch> (raw)
In-Reply-To: <3151721.aeNJFYEL58@kreacher>
On Tue, Feb 01, 2022 at 08:07:08PM +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/net/ethernet/cavium/thunder/thunder_bgx.c | 4 ++--
> drivers/net/fjes/fjes_main.c | 10 +++-------
> drivers/net/mdio/mdio-xgene.c | 8 +++-----
> 3 files changed, 8 insertions(+), 14 deletions(-)
>
> Index: linux-pm/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> ===================================================================
> --- linux-pm.orig/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> +++ linux-pm/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
> @@ -1407,9 +1407,9 @@ static acpi_status bgx_acpi_register_phy
> {
> struct bgx *bgx = context;
> struct device *dev = &bgx->pdev->dev;
> - struct acpi_device *adev;
> + struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
Hi Rafael
Since this is part of the networking subsystem, reverse christmas tree
applies. Yes, this driver gets is wrong here, but we should not make
it even worse. Please put this variable first.
> Index: linux-pm/drivers/net/mdio/mdio-xgene.c
> ===================================================================
> --- linux-pm.orig/drivers/net/mdio/mdio-xgene.c
> +++ linux-pm/drivers/net/mdio/mdio-xgene.c
> @@ -280,15 +280,13 @@ static acpi_status acpi_register_phy(acp
> void *context, void **ret)
> {
> struct mii_bus *mdio = context;
> - struct acpi_device *adev;
> + struct acpi_device *adev = acpi_fetch_acpi_dev(handle);
Here as well please.
With those changes, you can add my Reviewed-by:
Thanks
Andrew
prev parent reply other threads:[~2022-02-01 19:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 19:07 [PATCH] drivers: net: Replace acpi_bus_get_device() Rafael J. Wysocki
2022-02-01 19:27 ` Andrew Lunn [this message]
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=YfmJmgE/KuS8G92w@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=iyappan@os.amperecomputing.com \
--cc=keyur@os.amperecomputing.com \
--cc=kuba@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=quan@os.amperecomputing.com \
--cc=rjw@rjwysocki.net \
--cc=sgoutham@marvell.com \
/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