From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found
Date: Wed, 31 Aug 2016 18:41:56 +0200 [thread overview]
Message-ID: <20160831164156.GL14379@lukather> (raw)
In-Reply-To: <CAGb2v67hiYhjQNXLZUz7ZT2214AAYsFwQkg42qKEFv-7kShsQQ@mail.gmail.com>
On Wed, Aug 31, 2016 at 07:09:23PM +0800, Chen-Yu Tsai wrote:
> >>> sun4i_tcon_channel_disable(tcon, 0);
> >>>
> >>> - if (!IS_ERR(encoder->bridge))
> >>> - drm_bridge_disable(encoder->bridge);
> >>> + drm_bridge_disable(encoder->bridge);
> >>
> >> I'd rather keep those changes, it makes it obvious that it's something
> >> optionnal, that can be set to NULL.
> >
> > OK.
>
> What about having a comment instead? Saves an extra branch condition,
> while still showing that it's optional.
I'm not sure we have to worry about an extra branch condition, but
yeah, that works for me.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160831/05fc9ca6/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found
Date: Wed, 31 Aug 2016 18:41:56 +0200 [thread overview]
Message-ID: <20160831164156.GL14379@lukather> (raw)
In-Reply-To: <CAGb2v67hiYhjQNXLZUz7ZT2214AAYsFwQkg42qKEFv-7kShsQQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 740 bytes --]
On Wed, Aug 31, 2016 at 07:09:23PM +0800, Chen-Yu Tsai wrote:
> >>> sun4i_tcon_channel_disable(tcon, 0);
> >>>
> >>> - if (!IS_ERR(encoder->bridge))
> >>> - drm_bridge_disable(encoder->bridge);
> >>> + drm_bridge_disable(encoder->bridge);
> >>
> >> I'd rather keep those changes, it makes it obvious that it's something
> >> optionnal, that can be set to NULL.
> >
> > OK.
>
> What about having a comment instead? Saves an extra branch condition,
> while still showing that it's optional.
I'm not sure we have to worry about an extra branch condition, but
yeah, that works for me.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: David Airlie <airlied@linux.ie>,
dri-devel <dri-devel@lists.freedesktop.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found
Date: Wed, 31 Aug 2016 18:41:56 +0200 [thread overview]
Message-ID: <20160831164156.GL14379@lukather> (raw)
In-Reply-To: <CAGb2v67hiYhjQNXLZUz7ZT2214AAYsFwQkg42qKEFv-7kShsQQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
On Wed, Aug 31, 2016 at 07:09:23PM +0800, Chen-Yu Tsai wrote:
> >>> sun4i_tcon_channel_disable(tcon, 0);
> >>>
> >>> - if (!IS_ERR(encoder->bridge))
> >>> - drm_bridge_disable(encoder->bridge);
> >>> + drm_bridge_disable(encoder->bridge);
> >>
> >> I'd rather keep those changes, it makes it obvious that it's something
> >> optionnal, that can be set to NULL.
> >
> > OK.
>
> What about having a comment instead? Saves an extra branch condition,
> while still showing that it's optional.
I'm not sure we have to worry about an extra branch condition, but
yeah, that works for me.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-31 16:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-30 12:22 [PATCH] drm/sun4i: Clear encoder->bridge if a bridge is not found Chen-Yu Tsai
2016-08-30 12:22 ` Chen-Yu Tsai
2016-08-30 12:56 ` Maxime Ripard
2016-08-30 12:56 ` Maxime Ripard
2016-08-30 12:56 ` Maxime Ripard
2016-08-30 15:51 ` Chen-Yu Tsai
2016-08-30 15:51 ` Chen-Yu Tsai
2016-08-31 11:09 ` Chen-Yu Tsai
2016-08-31 11:09 ` Chen-Yu Tsai
2016-08-31 16:41 ` Maxime Ripard [this message]
2016-08-31 16:41 ` Maxime Ripard
2016-08-31 16:41 ` Maxime Ripard
2016-08-31 15:40 ` Maxime Ripard
2016-08-31 15:40 ` Maxime Ripard
2016-08-31 15:40 ` Maxime Ripard
2016-08-31 16:27 ` Daniel Vetter
2016-08-31 16:27 ` Daniel Vetter
2016-08-31 16:27 ` Daniel Vetter
2016-08-31 16:43 ` Maxime Ripard
2016-08-31 16:43 ` Maxime Ripard
2016-08-31 16:43 ` Maxime Ripard
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=20160831164156.GL14379@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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 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.