All of lore.kernel.org
 help / color / mirror / Atom feed
From: <wen.yang99@zte.com.cn>
To: Markus.Elfring@web.de
Cc: wang.yi59@zte.com.cn, narmstrong@baylibre.com, airlied@linux.ie,
	khilman@baylibre.com, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] drm/meson: fix possible object reference leak
Date: Mon, 8 Apr 2019 18:25:05 +0800 (CST)	[thread overview]
Message-ID: <201904081825052789643@zte.com.cn> (raw)
In-Reply-To: <50c3039d-ff5a-2136-863d-fcecce5bdc7f@web.de>


[-- Attachment #1.1: Type: text/plain, Size: 1149 bytes --]

> > v2->v1: convert a if statement into a ternary statement.
> 
> Would you like to omit the arrow in such version information?

Thank you for your comments
The information about the previous versions goes below the ---, 
and only the reviewers can see it.
It does not appear in the git log log.
Thanks.

> > @@ -720,15 +720,10 @@ static bool meson_hdmi_connector_is_available(struct device *dev)
> >
> >      /* If the endpoint node exists, consider it enabled */
> >      remote = of_graph_get_remote_port(ep);
> > -    if (remote) {
> > -        of_node_put(ep);
> > -        return true;
> > -    }
> > -
> >      of_node_put(ep);
> >      of_node_put(remote);
> 
> Can a reordering of the passed variables be useful for such function calls?
> 
> +      of_node_put(remote);
> +      of_node_put(ep);
> 

Thank you.
But considering the multiprocessor concurrent execution, 
the reverse of the order of these two statements may not have additional benefits.
The previous code implementation also maintains this order, 
and we will keep the original order unless we can prove that the reverse order can indeed bring real benefits.

--
Regards,
Wen

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-04-08 10:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08  2:58 [PATCH v2] drm/meson: fix possible object reference leak Wen Yang
2019-04-08  2:58 ` Wen Yang
2019-04-08  2:58 ` Wen Yang
2019-04-08  2:58 ` Wen Yang
2019-04-08  2:58 ` [PATCH v2] drm/omap: " Wen Yang
2019-04-08  8:49   ` Mukesh Ojha
2019-04-08  2:58 ` [PATCH v2] drm: rcar-du: " Wen Yang
2019-04-08  8:45   ` Mukesh Ojha
2019-04-08  9:23     ` wen.yang99
2019-04-08 16:38   ` Markus Elfring
2019-04-08  9:13 ` [PATCH v2] drm/meson: " Markus Elfring
2019-04-08  9:13   ` Markus Elfring
2019-04-08  9:13   ` Markus Elfring
2019-04-08 10:25   ` wen.yang99 [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=201904081825052789643@zte.com.cn \
    --to=wen.yang99@zte.com.cn \
    --cc=Markus.Elfring@web.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=wang.yi59@zte.com.cn \
    /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.