Re: [PATCH net-next v11 5/5] net: dsa: yt921x: Add support for Motorcomm YT921x
From: Jakub Kicinski
Date: Tue Sep 23 2025 - 20:47:39 EST
On Mon, 22 Sep 2025 21:11:43 +0800 David Yang wrote:
> + MIB_DESC(1, 0x00, "RxBroadcast", false), /* rx broadcast pkts */
> + MIB_DESC(1, 0x04, "RxPause", false), /* rx pause pkts */
> + MIB_DESC(1, 0x08, "RxMulticast", false), /* rx multicast pkts, excluding pause and OAM */
> + MIB_DESC(1, 0x0c, "RxCrcErr", false), /* rx crc err pkts, len >= 64B */
Keeping the string names for every stat, and the boolean seems like
an overkill when there is grand total of 3 stats that set "true".
The comments for IEEE stats can also go, there's no extra information
here.
> +static void yt921x_mdio_remove(struct mdio_device *mdiodev)
> +{
> + cancel_delayed_work_sync(&pp->mib_read);
> + }
> +
> + dsa_unregister_switch(&priv->ds);
The work canceling looks racy, the port can come up in between
cancel_work and dsa_unregister ? disable_delayed_work.. will likely
do the job.
--
pw-bot: cr