From: Philipp Zabel <p.zabel@pengutronix.de>
To: 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, 06 Mar 2018 09:16:32 +0100 [thread overview]
Message-ID: <1520324192.3375.3.camel@pengutronix.de> (raw)
In-Reply-To: <61c56895d44117d80e7d82f04e729e29c60fadbd.1519327370.git.baruch@tkos.co.il>
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>
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
next prev parent reply other threads:[~2018-03-06 8:16 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 [this message]
2018-03-06 8:52 ` Archit Taneja
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=1520324192.3375.3.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--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=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