From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com,
davem@davemloft.net, kuba@kernel.org
Subject: Re: [PATCH net-next] net: dsa: microchip: split adjust_link() in phylink_mac_link_{up|down}()
Date: Thu, 2 Jul 2020 11:19:58 +0100 [thread overview]
Message-ID: <20200702101958.GN1551@shell.armlinux.org.uk> (raw)
In-Reply-To: <20200702095439.1355119-1-codrin.ciubotariu@microchip.com>
On Thu, Jul 02, 2020 at 12:54:39PM +0300, Codrin Ciubotariu wrote:
> The DSA subsystem moved to phylink and adjust_link() became deprecated in
> the process. This patch removes adjust_link from the KSZ DSA switches and
> adds phylink_mac_link_up() and phylink_mac_link_down().
>
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
For the code _transformation_ that the patch does:
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
as it is equivalent. However, for a deeper review of what is going
on here, I've a question:
$ grep live_ports *
ksz8795.c: dev->live_ports = dev->host_mask;
ksz8795.c: dev->live_ports |= BIT(port);
ksz_common.h: u16 live_ports;
ksz_common.c: dev->live_ports &= ~(1 << port);
ksz_common.c: dev->live_ports |= (1 << port) & dev->on_ports;
ksz_common.c: dev->live_ports &= ~(1 << port);
ksz9477.c: dev->live_ports = dev->host_mask;
ksz9477.c: dev->live_ports |= (1 << port);
These are the only references to dev->live_ports, so the purpose of
dev->live_ports seems unclear; it seems it is only updated but never
read. Can it be removed, along with the locking in your new functions?
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2020-07-02 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-02 9:54 [PATCH net-next] net: dsa: microchip: split adjust_link() in phylink_mac_link_{up|down}() Codrin Ciubotariu
2020-07-02 10:19 ` Russell King - ARM Linux admin [this message]
2020-07-02 13:14 ` Codrin.Ciubotariu
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=20200702101958.GN1551@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=codrin.ciubotariu@microchip.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.com \
--cc=woojung.huh@microchip.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 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.