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: <CAKxU2N9JGcU58Di5C9Ga_Xd91ywEyoZ1kC=kp8+R3kggx4vw2w@mail.gmail.com>
Date: Sat, 5 Oct 2024 19:07:17 -0700
From: Rosen Penev <rosenp@...il.com>
To: netdev@...r.kernel.org
Cc: Rafał Miłecki <rafal@...ecki.pl>, 
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: bgmac: use devm for register_netdev

On Sat, Oct 5, 2024 at 6:39 PM Rosen Penev <rosenp@...il.com> wrote:
>
> Removes need to unregister in _remove.
>
> Tested on ASUS RT-N16. No change in behavior.
>
> Signed-off-by: Rosen Penev <rosenp@...il.com>
yikes. I wanted this in net-next.
> ---
>  drivers/net/ethernet/broadcom/bgmac.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
> index 6ffdc4229407..2599ffe46e27 100644
> --- a/drivers/net/ethernet/broadcom/bgmac.c
> +++ b/drivers/net/ethernet/broadcom/bgmac.c
> @@ -1546,7 +1546,7 @@ int bgmac_enet_probe(struct bgmac *bgmac)
>
>         bgmac->in_init = false;
>
> -       err = register_netdev(bgmac->net_dev);
> +       err = devm_register_netdev(bgmac->dev, bgmac->net_dev);
>         if (err) {
>                 dev_err(bgmac->dev, "Cannot register net device\n");
>                 goto err_phy_disconnect;
> @@ -1568,7 +1568,6 @@ EXPORT_SYMBOL_GPL(bgmac_enet_probe);
>
>  void bgmac_enet_remove(struct bgmac *bgmac)
>  {
> -       unregister_netdev(bgmac->net_dev);
>         phy_disconnect(bgmac->net_dev->phydev);
>         netif_napi_del(&bgmac->napi);
>         bgmac_dma_free(bgmac);
> --
> 2.46.2
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ