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: <ZWXbdjOCKxJFyXJK@shell.armlinux.org.uk>
Date: Tue, 28 Nov 2023 12:22:14 +0000
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Christian Marangi <ansuelsmth@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
	Florian Fainelli <florian.fainelli@...adcom.com>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Vladimir Oltean <olteanv@...il.com>,
	David Epping <david.epping@...singlinkelectronics.com>,
	Harini Katakam <harini.katakam@....com>,
	Simon Horman <horms@...nel.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [net-next PATCH v2 3/4] net: phy: restructure
 __phy_write/read_mmd to helper and phydev user

On Tue, Nov 28, 2023 at 01:11:00PM +0100, Christian Marangi wrote:
> On Tue, Nov 28, 2023 at 01:46:10AM +0100, Andrew Lunn wrote:
> > On Mon, Nov 27, 2023 at 12:51:40AM +0100, Christian Marangi wrote:
> > > Restructure phy_write_mmd and phy_read_mmd to implement generic helper
> > > for direct mdiobus access for mmd and use these helper for phydev user.
> > > 
> > > This is needed in preparation of PHY package API that requires generic
> > > access to the mdiobus and are deatched from phydev struct but instead
> > > access them based on PHY package base_addr and offsets.
> > 
> > Why is this all going into the header file?
> >
> 
> Was following the pattern done by phy_package_read/write.
> 
> Considering those API are not single function call... I wonder if those
> should be moved in phy_core.c instead of static inline them in the
> header.

phy_package_{read,write} are simple affairs - one test and a call
to a function. That makes them fairly small. The proposed new
functions aren't small, which means that we get a load of code each
time they're used. Therefore, it's better that they're out of line.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ