mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [cxl:preview 41/49] kernel/resource.c:1823:25: warning: variable 'res' is uninitialized when used within its own initialization
@ 2022-06-23 12:44 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-06-23 12:44 UTC (permalink / raw)
  To: Dan Williams
  Cc: llvm, kbuild-all, Alison Schofield, Vishal Verma, Ira Weiny,
	Ben Widawsky, Dan Williams, linux-kernel, Ben Widawsky

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git preview
head:   b2d4fd5c97b59f622e6c45ac51020cdcd66bb022
commit: 96ec07f789bf8a52f5c00d3310d9b7ec4c701738 [41/49] cxl/region: Allocate host physical address (HPA) capacity to new regions
config: x86_64-randconfig-a005 (https://download.01.org/0day-ci/archive/20220623/202206232003.bjvwazsK-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 46be5faaf03466c3751f8a2882bef5a217e15926)
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
        # https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git/commit/?id=96ec07f789bf8a52f5c00d3310d9b7ec4c701738
        git remote add cxl https://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl.git
        git fetch --no-tags cxl preview
        git checkout 96ec07f789bf8a52f5c00d3310d9b7ec4c701738
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All warnings (new ones prefixed by >>):

>> kernel/resource.c:1823:25: warning: variable 'res' is uninitialized when used within its own initialization [-Wuninitialized]
           struct resource *res = res;
                            ~~~   ^~~
   1 warning generated.


vim +/res +1823 kernel/resource.c

6f2443c3ffee66 Dan Williams 2022-05-20  1820  
6f2443c3ffee66 Dan Williams 2022-05-20  1821  static void remove_free_mem_region(void *_res)
6f2443c3ffee66 Dan Williams 2022-05-20  1822  {
6f2443c3ffee66 Dan Williams 2022-05-20 @1823  	struct resource *res = res;
6f2443c3ffee66 Dan Williams 2022-05-20  1824  
6f2443c3ffee66 Dan Williams 2022-05-20  1825  	if (res->parent)
6f2443c3ffee66 Dan Williams 2022-05-20  1826  		remove_resource(res);
6f2443c3ffee66 Dan Williams 2022-05-20  1827  	free_resource(res);
6f2443c3ffee66 Dan Williams 2022-05-20  1828  }
6f2443c3ffee66 Dan Williams 2022-05-20  1829  

:::::: The code at line 1823 was first introduced by commit
:::::: 6f2443c3ffee6675ef14a4b1256400a9c8a652ca resource: Introduce alloc_free_mem_region()

:::::: TO: Dan Williams <dan.j.williams@intel.com>
:::::: CC: Dan Williams <dan.j.williams@intel.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

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

only message in thread, other threads:[~2022-06-23 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 12:44 [cxl:preview 41/49] kernel/resource.c:1823:25: warning: variable 'res' is uninitialized when used within its own initialization 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

all inboxes | Powered by JetHome®