From: Ioana Ciornei <ioana.ciornei@nxp.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>
Subject: Re: [PATCH net-next 3/3] dpaa2-mac: add PCS support through the Lynx module
Date: Mon, 21 Sep 2020 18:06:34 +0000 [thread overview]
Message-ID: <20200921180634.icsurl6qoz4nmz3n@skbuf> (raw)
In-Reply-To: <20200921170721.GE3717417@lunn.ch>
On Mon, Sep 21, 2020 at 07:07:21PM +0200, Andrew Lunn wrote:
> On Mon, Sep 21, 2020 at 07:20:31PM +0300, Ioana Ciornei wrote:
> > +static void dpaa2_pcs_destroy(struct dpaa2_mac *mac)
> > +{
> > + struct lynx_pcs *pcs = mac->pcs;
> > +
> > + if (pcs) {
> > + put_device(&pcs->mdio->dev);
> > + lynx_pcs_destroy(pcs);
> > + mac->pcs = NULL;
>
> Hi Ioana
>
> Maybe the put_device() should come after the destroy? It is then the
> reverse of the creation.
>
> Andrew
Hi Andrew,
The lynx_pcs_destroy() function doesn't do much with the pcs, just a
kfree on it. I did it this way to avoid keeping the device in a
temporary variable but if you think we should do this in a symetrical
way, I can make the change.
Ioana
next prev parent reply other threads:[~2020-09-21 18:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 16:20 [PATCH net-next 0/3] dpaa2-mac: add PCS support through the Lynx module Ioana Ciornei
2020-09-21 16:20 ` [PATCH net-next 1/3] net: pcs-lynx: add support for 10GBASER Ioana Ciornei
2020-09-21 16:20 ` [PATCH net-next 2/3] of: add of_mdio_find_device() api Ioana Ciornei
2020-09-21 16:20 ` [PATCH net-next 3/3] dpaa2-mac: add PCS support through the Lynx module Ioana Ciornei
2020-09-21 17:07 ` Andrew Lunn
2020-09-21 18:06 ` Ioana Ciornei [this message]
2020-09-23 0:10 ` [PATCH net-next 0/3] " David Miller
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=20200921180634.icsurl6qoz4nmz3n@skbuf \
--to=ioana.ciornei@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox