lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203261449.ZA8GwHFt-lkp@intel.com>
Date:   Sat, 26 Mar 2022 14:58:43 +0800
From:   kernel test robot <lkp@...el.com>
To:     Christian König <christian.koenig@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Daniel Vetter <daniel.vetter@...ll.ch>
Subject: [drm-misc:for-linux-next 2/3]
 drivers/dma-buf/st-dma-fence-unwrap.c:125:13: warning: variable 'err' set
 but not used

tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next
head:   519f490db07e1a539490612f376487f61e48e39c
commit: 64a8f92fd783e750cdb81af75942dcd53bbf61bd [2/3] dma-buf: add dma_fence_unwrap v2
config: powerpc-randconfig-m031-20220326 (https://download.01.org/0day-ci/archive/20220326/202203261449.ZA8GwHFt-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.0
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
        git remote add drm-misc git://anongit.freedesktop.org/drm/drm-misc
        git fetch --no-tags drm-misc for-linux-next
        git checkout 64a8f92fd783e750cdb81af75942dcd53bbf61bd
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/dma-buf/

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

All warnings (new ones prefixed by >>):

   drivers/dma-buf/st-dma-fence-unwrap.c: In function 'unwrap_array':
>> drivers/dma-buf/st-dma-fence-unwrap.c:125:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
     125 |         int err = 0;
         |             ^~~
   drivers/dma-buf/st-dma-fence-unwrap.c: In function 'unwrap_chain':
   drivers/dma-buf/st-dma-fence-unwrap.c:167:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
     167 |         int err = 0;
         |             ^~~
   drivers/dma-buf/st-dma-fence-unwrap.c: In function 'unwrap_chain_array':
   drivers/dma-buf/st-dma-fence-unwrap.c:209:13: warning: variable 'err' set but not used [-Wunused-but-set-variable]
     209 |         int err = 0;
         |             ^~~


vim +/err +125 drivers/dma-buf/st-dma-fence-unwrap.c

   120	
   121	static int unwrap_array(void *arg)
   122	{
   123		struct dma_fence *fence, *f1, *f2, *array;
   124		struct dma_fence_unwrap iter;
 > 125		int err = 0;
   126	
   127		f1 = mock_fence();
   128		if (!f1)
   129			return -ENOMEM;
   130	
   131		f2 = mock_fence();
   132		if (!f2) {
   133			dma_fence_put(f1);
   134			return -ENOMEM;
   135		}
   136	
   137		array = mock_array(2, f1, f2);
   138		if (!array)
   139			return -ENOMEM;
   140	
   141		dma_fence_unwrap_for_each(fence, &iter, array) {
   142			if (fence == f1) {
   143				f1 = NULL;
   144			} else if (fence == f2) {
   145				f2 = NULL;
   146			} else {
   147				pr_err("Unexpected fence!\n");
   148				err = -EINVAL;
   149			}
   150		}
   151	
   152		if (f1 || f2) {
   153			pr_err("Not all fences seen!\n");
   154			err = -EINVAL;
   155		}
   156	
   157		dma_fence_signal(f1);
   158		dma_fence_signal(f2);
   159		dma_fence_put(array);
   160		return 0;
   161	}
   162	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ