linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	Joerg Roedel <jroedel@suse.de>
Subject: [linux-next:master 10309/11059] drivers/iommu/fsl_pamu_domain.c:129:5: warning: variable 'i' is uninitialized when used here
Date: Fri, 9 Apr 2021 15:52:12 +0800	[thread overview]
Message-ID: <202104091559.LuRgQgrh-lkp@intel.com> (raw)

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

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@intel.com>

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@Freescale.com>
:::::: CC: Joerg Roedel <jroedel@suse.de>

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

                 reply	other threads:[~2021-04-09  7:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202104091559.LuRgQgrh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hch@lst.de \
    --cc=jroedel@suse.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).