[linux-next:master 10309/11059] drivers/iommu/fsl_pamu_domain.c:129:5: warning: variable 'i' is uninitialized when used here

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   6145d80cfc62e3ed8f16ff584d6287e6d88b82b9
commit: ba58d1216e2b2d2320b50591b767f50b13c623a8 [10309/11059] iommu/fsl_pamu: remove support for multiple windows
config: powerpc64-randconfig-r002-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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 powerpc64 cross compiling tool for clang build
        # apt-get install binutils-powerpc64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ba58d1216e2b2d2320b50591b767f50b13c623a8
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout ba58d1216e2b2d2320b50591b767f50b13c623a8
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 

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

All warnings (new ones prefixed by >>):

>> drivers/iommu/fsl_pamu_domain.c:129:5: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
                            i, liodn);
                            ^
   include/linux/printk.h:424:26: note: expanded from macro 'pr_debug'
           dynamic_pr_debug(fmt, ##__VA_ARGS__)
                                   ^~~~~~~~~~~
   include/linux/dynamic_debug.h:158:22: note: expanded from macro 'dynamic_pr_debug'
                              pr_fmt(fmt), ##__VA_ARGS__)
                                             ^~~~~~~~~~~
   include/linux/dynamic_debug.h:147:56: note: expanded from macro '_dynamic_func_call'
           __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
                                                                 ^~~~~~~~~~~
   include/linux/dynamic_debug.h:129:15: note: expanded from macro '__dynamic_func_call'
                   func(&id, ##__VA_ARGS__);               \
                               ^~~~~~~~~~~
   drivers/iommu/fsl_pamu_domain.c:122:16: note: initialize the variable 'i' to silence this warning
           int ret = 0, i;
                         ^
                          = 0
   1 warning generated.


vim +/i +129 drivers/iommu/fsl_pamu_domain.c

695093e38c3ef6 Varun Sethi       2013-07-15  118  
695093e38c3ef6 Varun Sethi       2013-07-15  119  static int update_liodn_stash(int liodn, struct fsl_dma_domain *dma_domain,
695093e38c3ef6 Varun Sethi       2013-07-15  120  			      u32 val)
695093e38c3ef6 Varun Sethi       2013-07-15  121  {
695093e38c3ef6 Varun Sethi       2013-07-15  122  	int ret = 0, i;
695093e38c3ef6 Varun Sethi       2013-07-15  123  	unsigned long flags;
695093e38c3ef6 Varun Sethi       2013-07-15  124  
695093e38c3ef6 Varun Sethi       2013-07-15  125  	spin_lock_irqsave(&iommu_lock, flags);
ba58d1216e2b2d Christoph Hellwig 2021-04-01  126  	ret = pamu_update_paace_stash(liodn, val);
695093e38c3ef6 Varun Sethi       2013-07-15  127  	if (ret) {
cd70d4659ff3ab Emil Medve        2015-01-28  128  		pr_debug("Failed to update SPAACE %d field for liodn %d\n ",
cd70d4659ff3ab Emil Medve        2015-01-28 @129  			 i, liodn);
695093e38c3ef6 Varun Sethi       2013-07-15  130  		spin_unlock_irqrestore(&iommu_lock, flags);
695093e38c3ef6 Varun Sethi       2013-07-15  131  		return ret;
695093e38c3ef6 Varun Sethi       2013-07-15  132  	}
695093e38c3ef6 Varun Sethi       2013-07-15  133  
695093e38c3ef6 Varun Sethi       2013-07-15  134  	spin_unlock_irqrestore(&iommu_lock, flags);
695093e38c3ef6 Varun Sethi       2013-07-15  135  
695093e38c3ef6 Varun Sethi       2013-07-15  136  	return ret;
695093e38c3ef6 Varun Sethi       2013-07-15  137  }
695093e38c3ef6 Varun Sethi       2013-07-15  138  

:::::: The code at line 129 was first introduced by commit
:::::: cd70d4659ff3ab7e25b29a6f70be5bcfd078db1f iommu/fsl: Various cleanups

:::::: TO: Emil Medve <Emilian.Medve@xxxxxxxxxxxxx>
:::::: CC: Joerg Roedel <jroedel@xxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux