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]
Date: Thu, 16 Nov 2023 21:24:45 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Justin Chen <justin.chen@...adcom.com>,
 bcm-kernel-feedback-list@...adcom.com, netdev@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Cc: Florian Fainelli <florian.fainelli@...adcom.com>,
 Jakub Kicinski <kuba@...nel.org>, Wojciech Drewek
 <wojciech.drewek@...el.com>, Julia Lawall <Julia.Lawall@...ia.fr>,
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
 Paolo Abeni <pabeni@...hat.com>, LKML <linux-kernel@...r.kernel.org>,
 cocci@...ia.fr, Simon Horman <horms@...nel.org>
Subject: Re: [PATCH v2] net: bcmasp: Use common error handling code in
 bcmasp_probe()

>> Add a jump target so that a bit of exception handling can be better reused
>> in this function implementation.
…
>> +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c
>> @@ -1304,9 +1304,8 @@ static int bcmasp_probe(struct platform_device *pdev)
>>                 intf = bcmasp_interface_create(priv, intf_node, i);
>>                 if (!intf) {
>>                         dev_err(dev, "Cannot create eth interface %d\n", i);
>> -                       bcmasp_remove_intfs(priv);
>>                         of_node_put(intf_node);
>> -                       goto of_put_exit;
>> +                       goto remove_intfs;
>>                 }
>>                 list_add_tail(&intf->list, &priv->intfs);
>>                 i++;
>> @@ -1331,6 +1330,7 @@ static int bcmasp_probe(struct platform_device *pdev)
>>                         netdev_err(intf->ndev,
>>                                    "failed to register net_device: %d\n", ret);
>>                         priv->destroy_wol(priv);
>> +remove_intfs:
>>                         bcmasp_remove_intfs(priv);
>>                         goto of_put_exit;
>>                 }
>> --
>> 2.42.1
>>
> nak. Doesn't save any lines of code.

Would you get into the mood to take also another look at consequences for executable code?


> Doesn't make things clearer or easier to follow.

Maybe.


> This doesn't seem like an improvement to me.

Can this software implementation benefit from one function call less?

Regards,
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ