Skip to content

Commit

Permalink
drm/imx/dcss: fix coccinelle warning
Browse files Browse the repository at this point in the history
This small patch fixes a warning that I got while running coccinelle:

  CHECK   drivers/gpu/drm/imx/dcss/dcss-plane.c
  drivers/gpu/drm/imx/dcss/dcss-plane.c:107:21-23: WARNING !A || A && B is equivalent to !A || B

Fixes: 9021c31 ("drm/imx: Add initial support for DCSS on iMX8MQ")
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@oss.nxp.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201105140127.25249-3-laurentiu.palcu@oss.nxp.com
  • Loading branch information
Laurentiu Palcu authored and Lucas Stach committed Nov 26, 2020
1 parent 59cb403 commit 594486b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/imx/dcss/dcss-plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ static bool dcss_plane_can_rotate(const struct drm_format_info *format,
bool mod_present, u64 modifier,
unsigned int rotation)
{
bool linear_format = !mod_present ||
(mod_present && modifier == DRM_FORMAT_MOD_LINEAR);
bool linear_format = !mod_present || modifier == DRM_FORMAT_MOD_LINEAR;
u32 supported_rotation = DRM_MODE_ROTATE_0;

if (!format->is_yuv && linear_format)
Expand Down

0 comments on commit 594486b

Please sign in to comment.