linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [kbuild] drivers/gpu/drm/exynos/exynos_drm_dma.c:144 exynos_drm_register_dma() error: uninitialized symbol 'mapping'.
@ 2021-03-02  7:49 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-03-02  7:49 UTC (permalink / raw)
  To: kbuild, Robin Murphy; +Cc: lkp, kbuild-all, linux-kernel, Joerg Roedel

[-- Attachment #1: Type: text/plain, Size: 3130 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  master
head:   7a7fd0de4a9804299793e564a555a49c1fc924cb
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
config: xtensa-randconfig-m031-20210302 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/exynos/exynos_drm_dma.c:144 exynos_drm_register_dma() error: uninitialized symbol 'mapping'.

vim +/mapping +144 drivers/gpu/drm/exynos/exynos_drm_dma.c

07dc3678bacc2a Marek Szyprowski 2020-03-09  121  int exynos_drm_register_dma(struct drm_device *drm, struct device *dev,
07dc3678bacc2a Marek Szyprowski 2020-03-09  122  			    void **dma_priv)
237556962e5115 Andrzej Hajda    2018-10-12  123  {
237556962e5115 Andrzej Hajda    2018-10-12  124  	struct exynos_drm_private *priv = drm->dev_private;
237556962e5115 Andrzej Hajda    2018-10-12  125  
237556962e5115 Andrzej Hajda    2018-10-12  126  	if (!priv->dma_dev) {
237556962e5115 Andrzej Hajda    2018-10-12  127  		priv->dma_dev = dev;
237556962e5115 Andrzej Hajda    2018-10-12  128  		DRM_INFO("Exynos DRM: using %s device for DMA mapping operations\n",
237556962e5115 Andrzej Hajda    2018-10-12  129  			 dev_name(dev));
237556962e5115 Andrzej Hajda    2018-10-12  130  	}
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  131  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  132  	if (!IS_ENABLED(CONFIG_EXYNOS_IOMMU))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  133  		return 0;
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  134  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  135  	if (!priv->mapping) {
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  136  		void *mapping;
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  137  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  138  		if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  139  			mapping = arm_iommu_create_mapping(&platform_bus_type,
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  140  				EXYNOS_DEV_ADDR_START, EXYNOS_DEV_ADDR_SIZE);
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  141  		else if (IS_ENABLED(CONFIG_IOMMU_DMA))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  142  			mapping = iommu_get_domain_for_dev(priv->dma_dev);
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  143  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12 @144  		if (IS_ERR(mapping))

See the attached .config.  Neither option is enabled but it still
managed to compile this function.

67fbf3a3ef8443 Andrzej Hajda    2018-10-12  145  			return PTR_ERR(mapping);
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  146  		priv->mapping = mapping;
237556962e5115 Andrzej Hajda    2018-10-12  147  	}
237556962e5115 Andrzej Hajda    2018-10-12  148  
07dc3678bacc2a Marek Szyprowski 2020-03-09  149  	return drm_iommu_attach_device(drm, dev, dma_priv);
237556962e5115 Andrzej Hajda    2018-10-12  150  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27554 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [kbuild] drivers/gpu/drm/exynos/exynos_drm_dma.c:144 exynos_drm_register_dma() error: uninitialized symbol 'mapping'.
@ 2021-03-26 11:21 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-03-26 11:21 UTC (permalink / raw)
  To: kbuild, Robin Murphy
  Cc: lkp, Dan Carpenter, kbuild-all, linux-kernel, Joerg Roedel

[-- Attachment #1: Type: text/plain, Size: 3143 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git  master
head:   db24726bfefa68c606947a86132591568a06bfb4
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
config: nios2-randconfig-m031-20210326 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/gpu/drm/exynos/exynos_drm_dma.c:144 exynos_drm_register_dma() error: uninitialized symbol 'mapping'.

vim +/mapping +144 drivers/gpu/drm/exynos/exynos_drm_dma.c

07dc3678bacc2a Marek Szyprowski 2020-03-09  121  int exynos_drm_register_dma(struct drm_device *drm, struct device *dev,
07dc3678bacc2a Marek Szyprowski 2020-03-09  122  			    void **dma_priv)
237556962e5115 Andrzej Hajda    2018-10-12  123  {
237556962e5115 Andrzej Hajda    2018-10-12  124  	struct exynos_drm_private *priv = drm->dev_private;
237556962e5115 Andrzej Hajda    2018-10-12  125  
237556962e5115 Andrzej Hajda    2018-10-12  126  	if (!priv->dma_dev) {
237556962e5115 Andrzej Hajda    2018-10-12  127  		priv->dma_dev = dev;
237556962e5115 Andrzej Hajda    2018-10-12  128  		DRM_INFO("Exynos DRM: using %s device for DMA mapping operations\n",
237556962e5115 Andrzej Hajda    2018-10-12  129  			 dev_name(dev));
237556962e5115 Andrzej Hajda    2018-10-12  130  	}
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  131  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  132  	if (!IS_ENABLED(CONFIG_EXYNOS_IOMMU))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  133  		return 0;
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  134  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  135  	if (!priv->mapping) {
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  136  		void *mapping;
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  137  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  138  		if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  139  			mapping = arm_iommu_create_mapping(&platform_bus_type,
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  140  				EXYNOS_DEV_ADDR_START, EXYNOS_DEV_ADDR_SIZE);
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  141  		else if (IS_ENABLED(CONFIG_IOMMU_DMA))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  142  			mapping = iommu_get_domain_for_dev(priv->dma_dev);
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  143  
67fbf3a3ef8443 Andrzej Hajda    2018-10-12 @144  		if (IS_ERR(mapping))
67fbf3a3ef8443 Andrzej Hajda    2018-10-12  145  			return PTR_ERR(mapping);

Uninitialized in the attached .config.  (I feel like I already sent
this warning.  Sorry for the duplicate if so).

67fbf3a3ef8443 Andrzej Hajda    2018-10-12  146  		priv->mapping = mapping;
237556962e5115 Andrzej Hajda    2018-10-12  147  	}
237556962e5115 Andrzej Hajda    2018-10-12  148  
07dc3678bacc2a Marek Szyprowski 2020-03-09  149  	return drm_iommu_attach_device(drm, dev, dma_priv);
237556962e5115 Andrzej Hajda    2018-10-12  150  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org 

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24679 bytes --]

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-leave@lists.01.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-26 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-02  7:49 [kbuild] drivers/gpu/drm/exynos/exynos_drm_dma.c:144 exynos_drm_register_dma() error: uninitialized symbol 'mapping' Dan Carpenter
2021-03-26 11:21 Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).