OpenCloudOS-Kernel/drivers/gpu/drm/exynos
Nathan Chancellor c626f3864b
drm/exynos: Always initialize mapping in exynos_drm_register_dma()
In certain randconfigs, clang warns:

drivers/gpu/drm/exynos/exynos_drm_dma.c:121:19: warning: variable
'mapping' is uninitialized when used here [-Wuninitialized]
                priv->mapping = mapping;
                                ^~~~~~~
drivers/gpu/drm/exynos/exynos_drm_dma.c:111:16: note: initialize the
variable 'mapping' to silence this warning
                void *mapping;
                             ^
                              = NULL
1 warning generated.

This occurs when CONFIG_EXYNOS_IOMMU is enabled and both
CONFIG_ARM_DMA_USE_IOMMU and CONFIG_IOMMU_DMA are disabled, which makes
the code look like

  void *mapping;

  if (0)
    mapping = arm_iommu_create_mapping()
  else if (0)
    mapping = iommu_get_domain_for_dev()

  ...
  priv->mapping = mapping;

Add an else branch that initializes mapping to the -ENODEV error pointer
so that there is no more warning and the driver does not change during
runtime.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2021-08-22 01:56:39 +09:00
..
Kconfig drm/exynos: Stop using frame_vector helpers 2021-01-12 14:14:09 +01:00
Makefile
exynos7_drm_decon.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos5433_drm_decon.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos_dp.c drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
exynos_drm_crtc.c drm/atomic: Pass the full state to CRTC atomic begin and flush 2020-11-02 12:37:49 +01:00
exynos_drm_crtc.h
exynos_drm_dma.c drm/exynos: Always initialize mapping in exynos_drm_register_dma() 2021-08-22 01:56:39 +09:00
exynos_drm_dpi.c drm: Remove unnecessary drm_panel_attach and drm_panel_detach 2020-08-08 09:06:33 +02:00
exynos_drm_drv.c drm/exynos: Don't set struct drm_device.irq_enabled 2021-06-29 11:08:43 +02:00
exynos_drm_drv.h drm/exynos: Fix cleanup of IOMMU related objects 2020-03-10 13:25:18 +09:00
exynos_drm_dsi.c drm/dsi: Add _NO_ to MIPI_DSI_* flags disabling features 2021-07-27 09:48:24 +02:00
exynos_drm_fb.c drm/exynos: Don't set allow_fb_modifiers explicitly 2021-04-20 10:41:47 +02:00
exynos_drm_fb.h
exynos_drm_fbdev.c drm/exynos: gem: Fix sparse warning 2020-08-26 16:03:05 +09:00
exynos_drm_fbdev.h
exynos_drm_fimc.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos_drm_fimd.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos_drm_g2d.c drm/exynos: Convert from atomic_t to refcount_t on g2d_cmdlist_userptr->refcount 2021-08-22 01:56:38 +09:00
exynos_drm_g2d.h
exynos_drm_gem.c drm/exynos: Remove empty exynos_drm_gem_prime_{vmap,vunmap}() 2020-11-09 09:16:41 +01:00
exynos_drm_gem.h drm/exynos: Remove empty exynos_drm_gem_prime_{vmap,vunmap}() 2020-11-09 09:16:41 +01:00
exynos_drm_gsc.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos_drm_ipp.c drm/exynos/exynos_drm_ipp: Fix documentation for 'exynos_drm_ipp_get_{caps,res}_ioctl()' 2021-06-03 13:33:01 +02:00
exynos_drm_ipp.h drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_mic.c drm/exynos: Use pm_runtime_resume_and_get() to replace open coding 2021-06-11 10:56:27 +09:00
exynos_drm_plane.c drm: Use state helper instead of the plane state pointer 2021-02-25 08:05:28 +01:00
exynos_drm_plane.h
exynos_drm_rotator.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos_drm_scaler.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
exynos_drm_vidi.c drm/exynos-vidi: convert platform driver to use dev_groups 2020-05-18 13:19:18 +09:00
exynos_drm_vidi.h
exynos_hdmi.c drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
exynos_mixer.c drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
regs-decon7.h
regs-decon5433.h
regs-fimc.h
regs-gsc.h
regs-hdmi.h
regs-mixer.h
regs-rotator.h
regs-scaler.h
regs-vp.h