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: <37dd6262-615f-455b-873d-8cce71f5b455@huawei.com>
Date: Fri, 23 Aug 2024 10:45:43 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <shaojijie@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <shenjian15@...wei.com>,
	<wangpeiyang1@...wei.com>, <liuyonglong@...wei.com>,
	<sudongming1@...wei.com>, <xujunsheng@...wei.com>, <shiyongbang@...wei.com>,
	<libaihan@...wei.com>, <jdamato@...tly.com>, <horms@...nel.org>,
	<jonathan.cameron@...wei.com>, <shameerali.kolothum.thodi@...wei.com>,
	<salil.mehta@...wei.com>, <netdev@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3 net-next 03/11] net: hibmcge: Add mdio and hardware
 configuration supported in this module


on 2024/8/23 0:13, Andrew Lunn wrote:
>> +void hbg_phy_start(struct hbg_priv *priv)
>> +{
>> +	if (!priv->mac.phydev)
>> +		return;
>> +
>> +	phy_start(priv->mac.phydev);
>> +}
>> +
>> +void hbg_phy_stop(struct hbg_priv *priv)
>> +{
>> +	if (!priv->mac.phydev)
>> +		return;
>> +
>> +	phy_stop(priv->mac.phydev);
> Can this condition priv->mac.phydev not be true? The mdio bus setup
> and connecting to the PHY seems to be unconditional. If it fails, the
> driver fails to probe.
>
> 	Andrew

Yes, these two functions are called during open or down.
so phy is definitely not be NULL. Therefore, this judgment can be deleted.

Thanks,
	Jijie Shao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ