All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Horatiu Vultur <horatiu.vultur@microchip.com>
Cc: Vadim Fedorenko <vadim.fedorenko@linux.dev>, <andrew@lunn.ch>,
	<hkallweit1@gmail.com>, <linux@armlinux.org.uk>,
	<davem@davemloft.net>, <edumazet@google.com>, <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>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] phy: mscc: Fix when PTP clock is register and unregister
Date: Fri, 22 Aug 2025 15:58:34 -0700	[thread overview]
Message-ID: <20250822155834.57c7438d@kernel.org> (raw)
In-Reply-To: <20250822062726.cv7bdoorf6c4wkvt@DEN-DL-M31836.microchip.com>

On Fri, 22 Aug 2025 08:27:26 +0200 Horatiu Vultur wrote:
> > > +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()  
> 
> I understand, I can update not to return anything.

It does look a little unnecessary.

> Regarding __vsc8584_deinit_ptp, I have created that function just to be
> similar with the __vsc8584_init_ptp.

Alternatively you could only deinit if the clock pointer is valid,
regardless of chip id. Unclear which one is the cleanest form, TBH.

  reply	other threads:[~2025-08-22 22:58 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
2025-08-22  6:27   ` Horatiu Vultur
2025-08-22 22:58     ` Jakub Kicinski [this message]
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=20250822155834.57c7438d@kernel.org \
    --to=kuba@kernel.org \
    --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=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=vadim.fedorenko@linux.dev \
    --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 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.