dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	Baruch Siach <baruch@tkos.co.il>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: of: simplify component probe code
Date: Tue, 6 Mar 2018 14:22:01 +0530	[thread overview]
Message-ID: <ea39efae-3068-f141-d434-ec9966daebf3@codeaurora.org> (raw)
In-Reply-To: <1520324192.3375.3.camel@pengutronix.de>



On Tuesday 06 March 2018 01:46 PM, Philipp Zabel wrote:
> On Thu, 2018-02-22 at 21:22 +0200, Baruch Siach wrote:
>> Use positive logic for better readability. This also eliminates one
>> of_node_put() call, making the code shorter.
>>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> 
> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
> Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
> 

queued to drm-misc-next after fixing a minor checkpatch
warning.

Thanks,
Archit

> regards
> Philipp
> 
>> ---
>>   drivers/gpu/drm/drm_of.c | 8 +++-----
>>   1 file changed, 3 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
>> index 4c191c050e7d..fa354d14127b 100644
>> --- a/drivers/gpu/drm/drm_of.c
>> +++ b/drivers/gpu/drm/drm_of.c
>> @@ -122,12 +122,10 @@ int drm_of_component_probe(struct device *dev,
>>   		if (!port)
>>   			break;
>>   
>> -		if (!of_device_is_available(port->parent)) {
>> -			of_node_put(port);
>> -			continue;
>> -		}
>> +		if (of_device_is_available(port->parent))
>> +			drm_of_component_match_add(dev, &match, compare_of,
>> +				port);
>>   
>> -		drm_of_component_match_add(dev, &match, compare_of, port);
>>   		of_node_put(port);
>>   	}
>>   
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2018-03-06  8:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 19:22 [PATCH] drm: of: simplify component probe code Baruch Siach
2018-03-06  8:16 ` Philipp Zabel
2018-03-06  8:52   ` Archit Taneja [this message]

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=ea39efae-3068-f141-d434-ec9966daebf3@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=airlied@linux.ie \
    --cc=baruch@tkos.co.il \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=p.zabel@pengutronix.de \
    --cc=seanpaul@chromium.org \
    /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