[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <35a52379-5b97-46d4-be0f-1eca6d780a40@web.de>
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