From: Florian Fainelli <f.fainelli@gmail.com>
To: Sean Anderson <sean.anderson@seco.com>,
netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Russell King <linux@armlinux.org.uk>,
George McCollister <george.mccollister@gmail.com>,
Kishon Vijay Abraham I <kishon@ti.com>,
Mark Brown <broonie@kernel.org>,
Vivien Didelot <vivien.didelot@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>
Subject: Re: [PATCH 3/3] net: Convert more users of mdiobus_* to mdiodev_*
Date: Mon, 18 Oct 2021 15:09:41 -0700 [thread overview]
Message-ID: <441bf04b-8dcf-d300-946d-3a6af72396d3@gmail.com> (raw)
In-Reply-To: <20211018215448.1723702-3-sean.anderson@seco.com>
On 10/18/21 2:54 PM, Sean Anderson wrote:
> This converts users of mdiobus to mdiodev using the following semantic
> patch:
>
> @@
> identifier mdiodev;
> expression regnum;
> @@
>
> - mdiobus_read(mdiodev->bus, mdiodev->addr, regnum)
> + mdiodev_read(mdiodev, regnum)
>
> @@
> identifier mdiodev;
> expression regnum, val;
> @@
>
> - mdiobus_write(mdiodev->bus, mdiodev->addr, regnum, val)
> + mdiodev_write(mdiodev, regnum, val)
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
> I am not too experienced with coccinelle, so pointers would be
> appreciated. In particular, is it possible to convert things like
>
> bus = mdiodev->bus;
> addr = mdiodev->addr;
> mdiobus_foo(bus, addr, ...);
>
> in a generic way?
>
> drivers/base/regmap/regmap-mdio.c | 6 +++---
> drivers/net/dsa/xrs700x/xrs700x_mdio.c | 12 ++++++------
> drivers/phy/broadcom/phy-bcm-ns-usb3.c | 2 +-
> drivers/phy/broadcom/phy-bcm-ns2-pcie.c | 6 ++----
For the two above:
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
prev parent reply other threads:[~2021-10-18 22:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 21:54 [PATCH 1/3] net: mdio: Add helper functions for accessing MDIO devices Sean Anderson
2021-10-18 21:54 ` [PATCH 2/3] net: phylink: Convert some users of mdiobus_* to mdiodev_* Sean Anderson
2021-10-18 21:54 ` [PATCH 3/3] net: Convert more " Sean Anderson
2021-10-18 22:09 ` Florian Fainelli [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=441bf04b-8dcf-d300-946d-3a6af72396d3@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=george.mccollister@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kishon@ti.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=sean.anderson@seco.com \
--cc=vivien.didelot@gmail.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
all inboxes | Powered by JetHome®