[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <441bf04b-8dcf-d300-946d-3a6af72396d3@gmail.com>
Date: Mon, 18 Oct 2021 15:09:41 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Sean Anderson <sean.anderson@...o.com>, netdev@...r.kernel.org,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: linux-kernel@...r.kernel.org,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Russell King <linux@...linux.org.uk>,
George McCollister <george.mccollister@...il.com>,
Kishon Vijay Abraham I <kishon@...com>,
Mark Brown <broonie@...nel.org>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>
Subject: Re: [PATCH 3/3] net: Convert more users of mdiobus_* to mdiodev_*
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@...o.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@...il.com>
--
Florian
Powered by blists - more mailing lists