linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* drivers/gpu/drm/exynos/exynos_drm_dma.c:146:19: warning: variable 'mapping' is uninitialized when used here
@ 2021-03-14 22:44 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-03-14 22:44 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kbuild-all, clang-built-linux, linux-kernel

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

Hi Joerg,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   1e28eed17697bcf343c6743f0028cc3b5dd88bf0
commit: 56fbacc9bf23d372d78eef3809c1ac93d88e11f4 Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next
date:   8 months ago
config: riscv-randconfig-r022-20210315 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 7ee96429a0b057bcc97331a6a762fc3cd00aed61)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install riscv cross compiling tool for clang build
        # apt-get install binutils-riscv64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56fbacc9bf23d372d78eef3809c1ac93d88e11f4
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 56fbacc9bf23d372d78eef3809c1ac93d88e11f4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 

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

All warnings (new ones prefixed by >>):

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


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

237556962e5115 Andrzej Hajda    2018-10-12  120  
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);
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  }
237556962e5115 Andrzej Hajda    2018-10-12  151  

:::::: The code at line 146 was first introduced by commit
:::::: 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 drm/exynos/iommu: merge IOMMU and DMA code

:::::: TO: Andrzej Hajda <a.hajda@samsung.com>
:::::: CC: Inki Dae <inki.dae@samsung.com>

---
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: 32785 bytes --]

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

* drivers/gpu/drm/exynos/exynos_drm_dma.c:146:19: warning: variable 'mapping' is uninitialized when used here
@ 2021-01-07 16:41 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2021-01-07 16:41 UTC (permalink / raw)
  To: Joerg Roedel; +Cc: kbuild-all, clang-built-linux, linux-kernel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   e71ba9452f0b5b2e8dc8aa5445198cd9214a6a62
commit: 56fbacc9bf23d372d78eef3809c1ac93d88e11f4 Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next
date:   5 months ago
config: powerpc-randconfig-r001-20210107 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=56fbacc9bf23d372d78eef3809c1ac93d88e11f4
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 56fbacc9bf23d372d78eef3809c1ac93d88e11f4
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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

All warnings (new ones prefixed by >>):

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


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

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

:::::: The code at line 146 was first introduced by commit
:::::: 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 drm/exynos/iommu: merge IOMMU and DMA code

:::::: TO: Andrzej Hajda <a.hajda@samsung.com>
:::::: CC: Inki Dae <inki.dae@samsung.com>

---
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: 41513 bytes --]

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

* drivers/gpu/drm/exynos/exynos_drm_dma.c:146:19: warning: variable 'mapping' is uninitialized when used here
@ 2020-10-03 17:31 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-10-03 17:31 UTC (permalink / raw)
  To: Robin Murphy; +Cc: kbuild-all, clang-built-linux, linux-kernel, Joerg Roedel

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

Hi Robin,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d3d45f8220d60a0b2aaaacf8fb2be4e6ffd9008e
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
date:   3 months ago
config: x86_64-randconfig-a011-20201004 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bcd05599d0e53977a963799d6ee4f6e0bc21331b)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

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

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

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

:::::: The code at line 146 was first introduced by commit
:::::: 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 drm/exynos/iommu: merge IOMMU and DMA code

:::::: TO: Andrzej Hajda <a.hajda@samsung.com>
:::::: CC: Inki Dae <inki.dae@samsung.com>

---
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: 39849 bytes --]

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

* drivers/gpu/drm/exynos/exynos_drm_dma.c:146:19: warning: variable 'mapping' is uninitialized when used here
@ 2020-08-25 21:03 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-08-25 21:03 UTC (permalink / raw)
  To: Robin Murphy; +Cc: kbuild-all, clang-built-linux, linux-kernel, Joerg Roedel

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

Hi Robin,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
date:   7 weeks ago
config: x86_64-randconfig-r035-20200826 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 77e5a195f818b9ace91f7b12ab948b21d7918238)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

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

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
vim +/mapping +146 drivers/gpu/drm/exynos/exynos_drm_dma.c

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

:::::: The code at line 146 was first introduced by commit
:::::: 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 drm/exynos/iommu: merge IOMMU and DMA code

:::::: TO: Andrzej Hajda <a.hajda@samsung.com>
:::::: CC: Inki Dae <inki.dae@samsung.com>

---
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: 41030 bytes --]

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

* drivers/gpu/drm/exynos/exynos_drm_dma.c:146:19: warning: variable 'mapping' is uninitialized when used here
@ 2020-08-25 18:13 kernel test robot
  0 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2020-08-25 18:13 UTC (permalink / raw)
  To: Robin Murphy; +Cc: kbuild-all, clang-built-linux, linux-kernel, Joerg Roedel

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a
commit: b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 iommu: Tidy up Kconfig for SoC IOMMUs
date:   7 weeks ago
config: x86_64-randconfig-r035-20200826 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 77e5a195f818b9ace91f7b12ab948b21d7918238)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

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

# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248
vim +/mapping +146 drivers/gpu/drm/exynos/exynos_drm_dma.c

237556962e5115 Andrzej Hajda    2018-10-12  120  
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);
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  }
237556962e5115 Andrzej Hajda    2018-10-12  151  

:::::: The code at line 146 was first introduced by commit
:::::: 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 drm/exynos/iommu: merge IOMMU and DMA code

:::::: TO: Andrzej Hajda <a.hajda@samsung.com>
:::::: CC: Inki Dae <inki.dae@samsung.com>

---
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: 41030 bytes --]

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-14 22:44 drivers/gpu/drm/exynos/exynos_drm_dma.c:146:19: warning: variable 'mapping' is uninitialized when used here kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-01-07 16:41 kernel test robot
2020-10-03 17:31 kernel test robot
2020-08-25 21:03 kernel test robot
2020-08-25 18:13 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;
as well as URLs for NNTP newsgroup(s).