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]
Date: Wed, 3 Jan 2024 10:03:14 +0800
From: Yajun Deng <yajun.deng@...ux.dev>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, andrew@...n.ch, olteanv@...il.com, hkallweit1@...il.com,
 kabel@...nel.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-phy@...ts.infradead.org
Subject: Re: [PATCH net-next] net: phy: Cleanup struct mdio_driver_common


On 2024/1/3 01:34, Russell King (Oracle) wrote:
> On Thu, Dec 28, 2023 at 03:23:50PM +0800, Yajun Deng wrote:
>> The struct mdio_driver_common is a wrapper for driver-model structure,
>> it contains device_driver and flags. There are only struct phy_driver
>> and mdio_driver that use it. The flags is used to distinguish between
>> struct phy_driver and mdio_driver.
>>
>> We can test that if probe of device_driver is equal to phy_probe. This
>> way, the struct mdio_driver_common is no longer needed, and struct
>> phy_driver and usb_mdio_driver will be consistent with other driver
>> structs.
> usb_mdio_driver?

This is a mistake. It should be 'mdio_driver'.

>
> I'm not sure why this consistency is even desired, the commit message
> doesn't properly say _why_ this change is being proposed.

Most drivers use device_driver directly. This should be added to the commit.

Like this:

struct sdio_driver {

... ...

         struct device_driver drv;
};


struct pcie_port_service_driver {

... ...

         struct device_driver driver;
};

and so on ...


>
>> +bool is_phy_driver(struct device_driver *driver)
>> +{
>> +	return driver->probe == phy_probe;
>> +}
>> +EXPORT_SYMBOL_GPL(is_phy_driver);
> Do we really need this exported? It doesn't seem like something anything
> other than core MDIO/phylib code should know about, and all that becomes
> a single module when building it in a modular way - phylib can't be a
> separate module from mdio stuff.
I think this exported can be removed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ