[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e05a0f06-1e1f-58ee-ebab-fdc035d91dc4@web.de>
Date: Tue, 9 Apr 2019 09:30:03 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Wen Yang <wen.yang99@....com.cn>, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Yi Wang <wang.yi59@....com.cn>,
Wingman Kwok <w-kwok2@...com>,
Murali Karicheri <m-karicheri2@...com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [2/2] ethernet: ti: eliminated some duplicate code.
> 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
Powered by blists - more mailing lists