From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Horatiu Vultur <horatiu.vultur@microchip.com>,
andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, richardcochran@gmail.com,
vladimir.oltean@nxp.com, rmk+kernel@armlinux.org.uk,
rosenp@gmail.com, christophe.jaillet@wanadoo.fr,
viro@zeniv.linux.org.uk, atenart@kernel.org,
quentin.schulz@bootlin.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] phy: mscc: Fix when PTP clock is register and unregister
Date: Thu, 21 Aug 2025 14:50:35 +0100 [thread overview]
Message-ID: <3f8cef10-fbfd-42b7-8ab7-f15d46938eb3@linux.dev> (raw)
In-Reply-To: <20250821104628.2329569-1-horatiu.vultur@microchip.com>
On 21/08/2025 11:46, Horatiu Vultur wrote:
> +static void __vsc8584_deinit_ptp(struct phy_device *phydev)
> +{
> + struct vsc8531_private *vsc8531 = phydev->priv;
>
> - vsc8531->ptp->ptp_clock = ptp_clock_register(&vsc8531->ptp->caps,
> - &phydev->mdio.dev);
> - return PTR_ERR_OR_ZERO(vsc8531->ptp->ptp_clock);
> + ptp_clock_unregister(vsc8531->ptp->ptp_clock);
> + skb_queue_purge(&vsc8531->rx_skbs_list);
> }
>
> void vsc8584_config_ts_intr(struct phy_device *phydev)
> @@ -1552,6 +1549,18 @@ int vsc8584_ptp_init(struct phy_device *phydev)
> return 0;
> }
>
> +void vsc8584_ptp_deinit(struct phy_device *phydev)
> +{
> + switch (phydev->phy_id & phydev->drv->phy_id_mask) {
> + case PHY_ID_VSC8572:
> + case PHY_ID_VSC8574:
> + case PHY_ID_VSC8575:
> + case PHY_ID_VSC8582:
> + case PHY_ID_VSC8584:
> + return __vsc8584_deinit_ptp(phydev);
void function has no return value. as well as it shouldn't return
anything. I'm not quite sure why do you need __vsc8584_deinit_ptp()
at all, I think everything can be coded inside vsc8584_ptp_deinit()
> + }
> +}
next prev parent reply other threads:[~2025-08-21 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 10:46 [PATCH net] phy: mscc: Fix when PTP clock is register and unregister Horatiu Vultur
2025-08-21 13:50 ` Vadim Fedorenko [this message]
2025-08-22 6:27 ` Horatiu Vultur
2025-08-22 22:58 ` Jakub Kicinski
2025-08-25 6:14 ` Horatiu Vultur
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=3f8cef10-fbfd-42b7-8ab7-f15d46938eb3@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=andrew@lunn.ch \
--cc=atenart@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quentin.schulz@bootlin.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=rosenp@gmail.com \
--cc=viro@zeniv.linux.org.uk \
--cc=vladimir.oltean@nxp.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