From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wen.yang99@zte.com.cn>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Yi Wang <wang.yi59@zte.com.cn>,
Wingman Kwok <w-kwok2@ti.com>,
Murali Karicheri <m-karicheri2@ti.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [2/2] ethernet: ti: eliminated some duplicate code.
Date: Tue, 9 Apr 2019 09:30:03 +0200 [thread overview]
Message-ID: <e05a0f06-1e1f-58ee-ebab-fdc035d91dc4@web.de> (raw)
In-Reply-To: <1554788881-22647-2-git-send-email-wen.yang99@zte.com.cn>
> Put the code that obtains device_node and the code that
> uses it tightly together to remove duplicate resource
> cleanup statements between them.
1. Would the wording “ethernet: ti: eliminate a bit of duplicate code in gbe_probe()”
be more appropriate for the commit subject?
2. I find that such a change can be provided also without combining
it into a patch series with only two update steps.
Otherwise: Why did you omit the cover letter for the updates
by this small patch series?
> @@ -3651,22 +3651,18 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
> if (ret)
> return ret;
>
> - interfaces = of_get_child_by_name(node, "interfaces");
> - if (!interfaces)
> - dev_err(dev, "could not find interfaces\n");
> -
> ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
> gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
> - if (ret) {
> - of_node_put(interfaces);
> + if (ret)
> return ret;
> - }
>
> ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
> - if (ret) {
> - of_node_put(interfaces);
> + if (ret)
> return ret;
> - }
> +
> + interfaces = of_get_child_by_name(node, "interfaces");
> + if (!interfaces)
> + dev_err(dev, "could not find interfaces\n");
3. Can this error message trigger any further software development considerations
for the desired exception handling?
>
> /* Create network interfaces */
> INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);
Regards,
Markus
next prev parent reply other threads:[~2019-04-09 7:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-09 5:48 [PATCH 1/2] net: xilinx: add a helper function for axienet_probe Wen Yang
2019-04-09 5:48 ` [PATCH 2/2] net: ethernet: ti: eliminated some duplicate code Wen Yang
2019-04-09 7:30 ` Markus Elfring [this message]
2019-04-09 6:36 ` [1/2] net: xilinx: add a helper function for axienet_probe Markus Elfring
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=e05a0f06-1e1f-58ee-ebab-fdc035d91dc4@web.de \
--to=markus.elfring@web.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=netdev@vger.kernel.org \
--cc=w-kwok2@ti.com \
--cc=wang.yi59@zte.com.cn \
--cc=wen.yang99@zte.com.cn \
/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
all inboxes | Powered by JetHome®