mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>,
	linux-kernel@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 7/9] net: mdio: mdio-bcm-iproc: simplify getting .driver_data
Date: Mon, 20 Sep 2021 14:56:44 -0700	[thread overview]
Message-ID: <6a8ffcab-4534-1692-5f6a-8a7906d07a09@gmail.com> (raw)
In-Reply-To: <20210920090522.23784-8-wsa+renesas@sang-engineering.com>

On 9/20/21 2:05 AM, Wolfram Sang wrote:
> We should get 'driver_data' from 'struct device' directly. Going via
> platform_device is an unneeded step back and forth.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> Build tested only. buildbot is happy.
> 
>  drivers/net/mdio/mdio-bcm-iproc.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mdio/mdio-bcm-iproc.c b/drivers/net/mdio/mdio-bcm-iproc.c
> index 77fc970cdfde..5666cfab15b9 100644
> --- a/drivers/net/mdio/mdio-bcm-iproc.c
> +++ b/drivers/net/mdio/mdio-bcm-iproc.c
> @@ -181,8 +181,7 @@ static int iproc_mdio_remove(struct platform_device *pdev)
>  #ifdef CONFIG_PM_SLEEP
>  static int iproc_mdio_resume(struct device *dev)
>  {
> -	struct platform_device *pdev = to_platform_device(dev);
> -	struct iproc_mdio_priv *priv = platform_get_drvdata(pdev);
> +	struct iproc_mdio_priv *priv = dev_get_drvdata(dev);

The change looks good to me, however if you change from
platform_get_drvdata() to dev_get_drvdata(), you might also want to
change from using platform_set_drvdata() to dev_set_drvdata() for
symmetry no? If not, then maybe this patch should be dropped?
-- 
Florian

  reply	other threads:[~2021-09-21  2:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  9:05 [PATCH 0/9] treewide: " Wolfram Sang
2021-09-20  9:05 ` [PATCH 1/9] dmaengine: stm32-dmamux: " Wolfram Sang
2021-09-20  9:05 ` [PATCH 2/9] firmware: meson: " Wolfram Sang
2021-09-20 12:22   ` Neil Armstrong
2021-09-20  9:05 ` [PATCH 3/9] gpio: xilinx: " Wolfram Sang
2021-09-22  9:48   ` Bartosz Golaszewski
2021-09-20  9:05 ` [PATCH 4/9] drm/msm: " Wolfram Sang
2021-09-20  9:05 ` [PATCH 5/9] drm/panfrost: " Wolfram Sang
2021-09-20 11:06   ` Alyssa Rosenzweig
2021-09-20 13:33   ` Steven Price
2021-09-20  9:05 ` [PATCH 6/9] iio: common: cros_ec_sensors: " Wolfram Sang
2021-09-23  9:16   ` Enric Balletbo i Serra
2021-09-25 14:54     ` Jonathan Cameron
2021-10-12  7:31       ` Wolfram Sang
2021-10-12  8:31         ` Jonathan Cameron
2021-09-20  9:05 ` [PATCH 7/9] net: mdio: mdio-bcm-iproc: " Wolfram Sang
2021-09-20 21:56   ` Florian Fainelli [this message]
2021-09-21  5:52     ` Wolfram Sang
2021-09-20  9:05 ` [PATCH 8/9] platform: chrome: cros_ec_sensorhub: " Wolfram Sang
2021-09-20  9:05 ` [PATCH 9/9] remoteproc: omap_remoteproc: " Wolfram Sang
2021-10-15 17:22 ` [PATCH 0/9] treewide: " Bjorn Andersson

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=6a8ffcab-4534-1692-5f6a-8a7906d07a09@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=wsa+renesas@sang-engineering.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

Powered by JetHome