From: Maxime Ripard <maxime@cerno.tech>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Eric Anholt <eric@anholt.net>,
Dave Stevenson <dave.stevenson@raspberrypi.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
clang-built-linux@googlegroups.com
Subject: Re: [PATCH] drm/vc4: Fix bitwise OR versus ternary operator in vc4_plane_mode_set
Date: Fri, 11 Sep 2020 11:30:39 +0200 [thread overview]
Message-ID: <20200911093039.ki55jtui5z5pftax@gilmour.lan> (raw)
In-Reply-To: <20200910171831.4112580-1-natechancellor@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]
On Thu, Sep 10, 2020 at 10:18:32AM -0700, Nathan Chancellor wrote:
> Clang warns:
>
> drivers/gpu/drm/vc4/vc4_plane.c:901:27: warning: operator '?:' has lower
> precedence than '|'; '|' will be evaluated first
> [-Wbitwise-conditional-parentheses]
> fb->format->has_alpha ?
> ~~~~~~~~~~~~~~~~~~~~~ ^
> drivers/gpu/drm/vc4/vc4_plane.c:901:27: note: place parentheses around
> the '|' expression to silence this warning
> fb->format->has_alpha ?
> ~~~~~~~~~~~~~~~~~~~~~ ^
> drivers/gpu/drm/vc4/vc4_plane.c:901:27: note: place parentheses around
> the '?:' expression to evaluate it first
> fb->format->has_alpha ?
> ~~~~~~~~~~~~~~~~~~~~~~^
> 1 warning generated.
>
> Add the parentheses as that was clearly intended, otherwise
> SCALER5_CTL2_ALPHA_PREMULT won't be added to the list.
>
> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1150
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Applied, thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2020-09-11 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 17:18 [PATCH] drm/vc4: Fix bitwise OR versus ternary operator in vc4_plane_mode_set Nathan Chancellor
2020-09-11 9:30 ` Maxime Ripard [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=20200911093039.ki55jtui5z5pftax@gilmour.lan \
--to=maxime@cerno.tech \
--cc=clang-built-linux@googlegroups.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.org \
--cc=natechancellor@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).