linux-stable/drivers/gpu/drm/imx
Linus Torvalds f2a9ecd71f drm: imx: fix compiler warning with gcc-12
[ Upstream commit 7aefd8b538 ]

Gcc-12 correctly warned about this code using a non-NULL pointer as a
truth value:

  drivers/gpu/drm/imx/ipuv3-crtc.c: In function ‘ipu_crtc_disable_planes’:
  drivers/gpu/drm/imx/ipuv3-crtc.c:72:21: error: the comparison will always evaluate as ‘true’ for the address of ‘plane’ will never be NULL [-Werror=address]
     72 |                 if (&ipu_crtc->plane[1] && plane == &ipu_crtc->plane[1]->base)
        |                     ^

due to the extraneous '&' address-of operator.

Philipp Zabel points out that The mistake had no adverse effect since
the following condition doesn't actually dereference the NULL pointer,
but the intent of the code was obviously to check for it, not to take
the address of the member.

Fixes: eb8c88808c ("drm/imx: add deferred plane disabling")
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-14 18:41:32 +02:00
..
dcss drm/imx/dcss: i.MX8MQ DCSS select DRM_GEM_CMA_HELPER 2022-02-18 09:25:16 +00:00
dw_hdmi-imx.c drm/imx: dw_hdmi-imx: Fix bailout in error cases of probe 2022-04-13 19:27:29 +02:00
imx-drm-core.c Revert "drm/imx: Annotate dma-fence critical section in commit path" 2021-11-05 19:08:44 +01:00
imx-drm.h drm/imx: Use simple encoder 2020-04-02 14:16:44 +02:00
imx-ldb.c drm/imx: imx-ldb: Check for null pointer after calling kmemdup 2022-04-13 19:27:29 +02:00
imx-tve.c drm/imx: imx-tve: use drm managed resources 2021-01-04 12:59:33 +01:00
ipuv3-crtc.c drm: imx: fix compiler warning with gcc-12 2022-06-14 18:41:32 +02:00
ipuv3-plane.c drm for v5.15-rc1 2021-09-01 11:26:46 -07:00
ipuv3-plane.h drm/imx: ipuv3-plane: use drm managed resources 2021-01-04 12:59:34 +01:00
Kconfig drm: Remove CONFIG_DRM_KMS_CMA_HELPER option 2021-11-30 11:10:03 +01:00
Makefile drm/imx: Add initial support for DCSS on iMX8MQ 2020-09-09 16:39:48 +02:00
parallel-display.c drm/imx: Fix memory leak in imx_pd_connector_get_modes 2022-04-13 19:27:29 +02:00