From: Jakub Kicinski <kuba@kernel.org>
To: Siddharth Vadapalli <s-vadapalli@ti.com>
Cc: <davem@davemloft.net>, <linux@armlinux.org.uk>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<kishon@ti.com>, <vigneshr@ti.com>, <grygorii.strashko@ti.com>
Subject: Re: [PATCH net v2] net: ethernet: ti: am65-cpsw: Fix devlink port register sequence
Date: Tue, 5 Jul 2022 18:39:01 -0700 [thread overview]
Message-ID: <20220705183901.2a536d50@kernel.org> (raw)
In-Reply-To: <20220704073040.7542-1-s-vadapalli@ti.com>
On Mon, 4 Jul 2022 13:00:40 +0530 Siddharth Vadapalli wrote:
> @@ -2527,6 +2527,10 @@ static int am65_cpsw_nuss_register_ndevs(struct am65_cpsw_common *common)
> return ret;
> }
>
> + ret = am65_cpsw_nuss_register_devlink(common);
> + if (ret)
> + goto err_cleanup_ndev;
> +
> for (i = 0; i < common->port_num; i++) {
> port = &common->ports[i];
>
> @@ -2539,23 +2543,21 @@ static int am65_cpsw_nuss_register_ndevs(struct am65_cpsw_common *common)
> i, ret);
> goto err_cleanup_ndev;
> }
> +
> + dl_port = &port->devlink_port;
> + devlink_port_type_eth_set(dl_port, port->ndev);
> }
>
> ret = am65_cpsw_register_notifiers(common);
> if (ret)
> goto err_cleanup_ndev;
>
> - ret = am65_cpsw_nuss_register_devlink(common);
> - if (ret)
> - goto clean_unregister_notifiers;
> -
> /* can't auto unregister ndev using devm_add_action() due to
> * devres release sequence in DD core for DMA
> */
>
> return 0;
> -clean_unregister_notifiers:
> - am65_cpsw_unregister_notifiers(common);
> +
> err_cleanup_ndev:
> am65_cpsw_nuss_cleanup_ndev(common);
No additions to the error handling path? Slightly suspicious.
Do the devlink ports not have to be removed if netdev registration
fails?
next prev parent reply other threads:[~2022-07-06 1:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 7:30 [PATCH net v2] net: ethernet: ti: am65-cpsw: Fix devlink port register sequence Siddharth Vadapalli
2022-07-06 1:39 ` Jakub Kicinski [this message]
2022-07-06 4:59 ` Siddharth Vadapalli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220705183901.2a536d50@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=s-vadapalli@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.