public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [daeinki-drm-exynos:exynos-drm-fixes 2/2] drivers/gpu/drm/exynos/exynos_drm_dma.c:119:19: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *'
@ 2023-11-21  7:00 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-11-21  7:00 UTC (permalink / raw)
  To: Inki Dae; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org:/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-fixes
head:   a30ba4bd7cdb5726d86a557c5df8df71c7bc7fad
commit: 9f6ed6faadde040e556880ade6881b3ad92861a3 [2/2] drm/exynos: fix a wrong error checking
config: arm-defconfig (https://download.01.org/0day-ci/archive/20231121/202311211403.ZKszRGRN-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project.git f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231121/202311211403.ZKszRGRN-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311211403.ZKszRGRN-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/exynos/exynos_drm_dma.c:119:19: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' [-Wint-conversion]
                           return PTR_ERR(-ENODEV);
                                          ^~~~~~~
   include/linux/err.h:49:61: note: passing argument to parameter 'ptr' here
   static inline long __must_check PTR_ERR(__force const void *ptr)
                                                               ^
   1 warning generated.


vim +119 drivers/gpu/drm/exynos/exynos_drm_dma.c

    94	
    95	int exynos_drm_register_dma(struct drm_device *drm, struct device *dev,
    96				    void **dma_priv)
    97	{
    98		struct exynos_drm_private *priv = drm->dev_private;
    99	
   100		if (!priv->dma_dev) {
   101			priv->dma_dev = dev;
   102			DRM_INFO("Exynos DRM: using %s device for DMA mapping operations\n",
   103				 dev_name(dev));
   104		}
   105	
   106		if (!IS_ENABLED(CONFIG_EXYNOS_IOMMU))
   107			return 0;
   108	
   109		if (!priv->mapping) {
   110			void *mapping = NULL;
   111	
   112			if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU))
   113				mapping = arm_iommu_create_mapping(&platform_bus_type,
   114					EXYNOS_DEV_ADDR_START, EXYNOS_DEV_ADDR_SIZE);
   115			else if (IS_ENABLED(CONFIG_IOMMU_DMA))
   116				mapping = iommu_get_domain_for_dev(priv->dma_dev);
   117	
   118			if (!mapping)
 > 119				return PTR_ERR(-ENODEV);
   120			priv->mapping = mapping;
   121		}
   122	
   123		return drm_iommu_attach_device(drm, dev, dma_priv);
   124	}
   125	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-11-21  7:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-21  7:00 [daeinki-drm-exynos:exynos-drm-fixes 2/2] drivers/gpu/drm/exynos/exynos_drm_dma.c:119:19: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const void *' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox