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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFSsGVvLr9KLFBjgs25RedKKJsHYeSw1xWLQnNddMYxUjrzLhg@mail.gmail.com>
Date: Tue, 20 May 2025 18:07:43 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: Andrew Lunn <andrew@...n.ch>, Andrew Lunn <andrew+netdev@...n.ch>, 
	Russell King - ARM Linux <linux@...linux.org.uk>, Jakub Kicinski <kuba@...nel.org>, 
	David Miller <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: move mdiobus_setup_mdiodev_from_board_info
 to mdio_bus_provider.c

On Tue, May 20, 2025 at 12:45 PM Paolo Abeni <pabeni@...hat.com> wrote:
>
> On 5/15/25 10:11 PM, Heiner Kallweit wrote:
> > Move mdiobus_setup_mdiodev_from_board_info() to mdio_bus_provider.c.
> > Benefits are:
> > - The function doesn't have to be exported any longer and can be made
> >   static.
> > - We can call mdiobus_create_device() directly instead of passing it
> >   as a callback.
> >
> > Only drawback is that now list and mutex have to be exported.
>
> ... so the total exports count actually increases, and I personally
> think that exporting a function is preferable to exporting a variable.
>
Current call chain is:

__mdio_bus_register()    // in mdio_bus_provider.c (module or built-in)
  mdiobus_setup_mdiodev_from_board_info()   // in mdio-boardinfo.c (built-in)
    mdiobus_create_device()    // in mdio_bus_provider.c, currently
passed to mdiobus_setup_mdiodev_from_board_info as function pointer

Having this call chain in one source file and not having to pass
mdiobus_create_device
as a function pointer outweighs the drawback of having to export list/mutex IMO.
But as always YMMV

> @Andrew, Russell: WDYT?
>
+1

> Thanks,
>
> Paolo
>
Thanks, Heiner

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ