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: <9b45a39b-c747-4597-95cc-01c752328aea@quicinc.com>
Date: Fri, 4 Oct 2024 01:09:12 +0800
From: quic_zijuhu <quic_zijuhu@...cinc.com>
To: Paolo Abeni <pabeni@...hat.com>, Timur Tabi <timur@...nel.org>,
        "David S.
 Miller" <davem@...emloft.net>,
        Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>,
        Eric Dumazet <edumazet@...gle.com>, Jakub
 Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        Zijun Hu
	<zijun_hu@...oud.com>
Subject: Re: [PATCH net-next RESEND v5] net: qcom/emac: Find sgmii_ops by
 device_for_each_child()

On 10/3/2024 9:39 PM, Paolo Abeni wrote:
>> @@ -356,10 +363,14 @@ int emac_sgmii_config(struct platform_device
>> *pdev, struct emac_adapter *adpt)
>>       int ret;
>>         if (has_acpi_companion(&pdev->dev)) {
>> +        struct emac_match_data match_data = {
>> +            .sgmii_ops = &phy->sgmii_ops,
>> +            .target_device = NULL,
>> +        };
>>           struct device *dev;
>>   -        dev = device_find_child(&pdev->dev, &phy->sgmii_ops,
>> -                    emac_sgmii_acpi_match);
>> +        device_for_each_child(&pdev->dev, &match_data,
>> emac_sgmii_acpi_match);
>> +        dev = match_data.target_device;
>>             if (!dev) {
>>               dev_warn(&pdev->dev, "cannot find internal phy node\n");
> 
> 
> I'm sorry for the late feedback. I agree with Greg, I think it would
> more clear removing the get_device() from the match function and add it
> here, after the 'if (!dev) {' statement.
> 

Thank you for helping me understand those good suggestions.
will correct it within next revision.

> Thanks,
> 
> Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ