lkml.org 
[lkml]   [2015]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] ARM OMAP2+ GPMC: add bus children
Hi Robert,

On 27/02/15 17:08, Robert Abel wrote:
> Hi Roger,
>
> On Fri, Feb 27, 2015 at 11:24 AM, Roger Quadros <rogerq@ti.com> wrote:
>>> + /* is child a common bus? */
>>> + if (of_match_node(of_default_bus_match_table, child))
>>> + /* create children and other common bus children */
>>> + if (of_platform_populate(child, of_default_bus_match_table, NULL, &pdev->dev))
>>> + goto err_child_fail;
>>
>> this would print "failed to create gpmc child" but we have already created
>> the gpmc child in the first of_platform_device_create() call.
>> A more appropriate message would be "failed to populate all children of child->name"
>>
>> Also do you want to return failure?
>> it will result in of_node_put() of the child and another print message
>> about "probing gpmc child %s failed" in gpmc_probe_dt().
>>
>> IMO if the GPMC node's child was created fine then we shouldn't return error.
>
> As of_platform_populate _always_ return 0 no matter what, the only way
> to reach that message is if probing the child failed.

GPMCs child is already probed. It is the child's child we are talking about
in of_platform_populate.

> As I cannot see into the future when of_platform_populate might
> actually be changed to return meaningful codes, we shouldn't try to
> foresee what the actual problem might be today either. This is a
> battle for another day.
>

If that is the case then I'd rather not check for return value of of_platform_populate().
Failure in populating GPMC child's children is already out of scope of GPMC driver.

cheers,
-roger


\
 
 \ /
  Last update: 2015-03-03 11:21    [W:0.096 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site