All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: Robert Abel <rabel@cit-ec.uni-bielefeld.de>
Cc: balbi@ti.com, linux-omap@vger.kernel.org,
	linux-usb@vger.kernel.org,
	Linux Kernel Maling List <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>,
	linux@arm.linux.org.uk
Subject: Re: [PATCH 2/8] ARM OMAP2+ GPMC: add bus children
Date: Tue, 3 Mar 2015 12:09:59 +0200	[thread overview]
Message-ID: <54F58877.2090608@ti.com> (raw)
In-Reply-To: <CAMdRc4F2EaDxrBAMUQ3NGvBt4sMnYX3FQXZttFzcPZJdKkOMLw@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: Robert Abel <rabel@cit-ec.uni-bielefeld.de>
Cc: <balbi@ti.com>, <linux-omap@vger.kernel.org>,
	<linux-usb@vger.kernel.org>,
	Linux Kernel Maling List <linux-kernel@vger.kernel.org>,
	Tony Lindgren <tony@atomide.com>, <linux@arm.linux.org.uk>
Subject: Re: [PATCH 2/8] ARM OMAP2+ GPMC: add bus children
Date: Tue, 3 Mar 2015 12:09:59 +0200	[thread overview]
Message-ID: <54F58877.2090608@ti.com> (raw)
In-Reply-To: <CAMdRc4F2EaDxrBAMUQ3NGvBt4sMnYX3FQXZttFzcPZJdKkOMLw@mail.gmail.com>

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

  reply	other threads:[~2015-03-03 10:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 14:45 [PATCH 0/8] ARM OMAP2+ GPMC: fixes and bus children Robert ABEL
2015-02-26 14:45 ` [PATCH 1/8] ARM OMAP2+ GPMC: don't undef DEBUG Robert ABEL
2015-02-26 14:45 ` [PATCH 2/8] ARM OMAP2+ GPMC: add bus children Robert ABEL
2015-02-27 10:24   ` Roger Quadros
2015-02-27 10:24     ` Roger Quadros
2015-02-27 15:08     ` Robert Abel
2015-03-03 10:09       ` Roger Quadros [this message]
2015-03-03 10:09         ` Roger Quadros
2015-03-03 10:43         ` Robert Abel
2015-02-26 14:45 ` [PATCH 4/8] ARM OMAP2+ GPMC: fix debug output alignment Robert ABEL
2015-02-26 14:45 ` [PATCH 4/8] ARM OMAP2+ GPMC: change get_gpmc_timing_reg output for DTS Robert ABEL
2015-02-26 15:06   ` Sergei Shtylyov
2015-02-27 14:17     ` Robert Abel
2015-02-27 14:23       ` Sergei Shtylyov
2015-02-27 15:51         ` Tony Lindgren
2015-02-27 10:43   ` Roger Quadros
2015-02-27 10:43     ` Roger Quadros
2015-02-27 14:05     ` Robert Abel
2015-02-26 14:45 ` [PATCH 5/8] ARM OMAP2+ GPMC: always program GPMCFCLKDIVIDER Robert ABEL
2015-02-26 14:45 ` [PATCH 6/8] ARM OMAP2+ GPMC: calculate GPMCFCLKDIVIDER based on WAITMONITORINGTIME Robert ABEL
2015-02-26 14:45 ` [PATCH 7/8] ARM OMAP2+ GPMC: fix WAITMONITORINGTIME divider bug Robert ABEL
2015-02-26 14:45 ` [PATCH 8/8] ARM OMAP2+ GPMC: fix programming/showing reserved timing parameters Robert ABEL
2015-03-03 12:53 ` [PATCH 0/8] ARM OMAP2+ GPMC: fixes and bus children Roger Quadros
2015-03-03 12:53   ` Roger Quadros
2015-03-03 12:55 ` Roger Quadros
2015-03-03 12:55   ` Roger Quadros
2015-03-03 12:59   ` Robert Abel
2015-03-06  0:59     ` Tony Lindgren

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=54F58877.2090608@ti.com \
    --to=rogerq@ti.com \
    --cc=balbi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rabel@cit-ec.uni-bielefeld.de \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.