lkml.org 
[lkml]   [2019]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [2/2] ethernet: ti: eliminated some duplicate code.
From
Date
> 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

\
 
 \ /
  Last update: 2019-04-09 09:31    [W:0.061 / U:17.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site