lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250822155834.57c7438d@kernel.org>
Date: Fri, 22 Aug 2025 15:58:34 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc: Vadim Fedorenko <vadim.fedorenko@...ux.dev>, <andrew@...n.ch>,
 <hkallweit1@...il.com>, <linux@...linux.org.uk>, <davem@...emloft.net>,
 <edumazet@...gle.com>, <pabeni@...hat.com>, <richardcochran@...il.com>,
 <vladimir.oltean@....com>, <rmk+kernel@...linux.org.uk>,
 <rosenp@...il.com>, <christophe.jaillet@...adoo.fr>,
 <viro@...iv.linux.org.uk>, <atenart@...nel.org>,
 <quentin.schulz@...tlin.com>, <netdev@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net] phy: mscc: Fix when PTP clock is register and
 unregister

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ