[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200911093039.ki55jtui5z5pftax@gilmour.lan>
Date: Fri, 11 Sep 2020 11:30:39 +0200
From: Maxime Ripard <maxime@...no.tech>
To: Nathan Chancellor <natechancellor@...il.com>
Cc: Eric Anholt <eric@...olt.net>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
clang-built-linux@...glegroups.com
Subject: Re: [PATCH] drm/vc4: Fix bitwise OR versus ternary operator in
vc4_plane_mode_set
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@...il.com>
Applied, thanks!
Maxime
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists