[drm-misc:drm-misc-next 1/1] drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error: variable 'out' set but not used

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

 



tree:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head:   b219865715e419435ad49dc2300fe3f85c79d3f6
commit: d6eb77731c45caf6ee7b18d907e9bc44be760e8c [1/1] Merge drm/drm-next into drm-misc-next
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240311/202403110614.LaW3UiNG-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240311/202403110614.LaW3UiNG-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403110614.LaW3UiNG-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c:843:6: error: variable 'out' set but not used [-Werror,-Wunused-but-set-variable]
     843 |         u64 out = dumper->iova + A6XX_CD_DATA_OFFSET;
         |             ^
   1 error generated.


vim +/out +843 drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c

64d6255650d4e0 Connor Abbott 2024-01-25  834  
1707add815519d Jordan Crouse 2018-11-02  835  /* Read a shader / debug block from the HLSQ aperture with the crashdumper */
1707add815519d Jordan Crouse 2018-11-02  836  static void a6xx_get_shader_block(struct msm_gpu *gpu,
d6852b4b2d0140 Jordan Crouse 2018-11-02  837  		struct a6xx_gpu_state *a6xx_state,
1707add815519d Jordan Crouse 2018-11-02  838  		const struct a6xx_shader_block *block,
1707add815519d Jordan Crouse 2018-11-02  839  		struct a6xx_gpu_state_obj *obj,
1707add815519d Jordan Crouse 2018-11-02  840  		struct a6xx_crashdumper *dumper)
1707add815519d Jordan Crouse 2018-11-02  841  {
1707add815519d Jordan Crouse 2018-11-02  842  	u64 *in = dumper->ptr;
64d6255650d4e0 Connor Abbott 2024-01-25 @843  	u64 out = dumper->iova + A6XX_CD_DATA_OFFSET;
1707add815519d Jordan Crouse 2018-11-02  844  	size_t datasize = block->size * A6XX_NUM_SHADER_BANKS * sizeof(u32);
1707add815519d Jordan Crouse 2018-11-02  845  	int i;
1707add815519d Jordan Crouse 2018-11-02  846  
1707add815519d Jordan Crouse 2018-11-02  847  	if (WARN_ON(datasize > A6XX_CD_DATA_SIZE))
1707add815519d Jordan Crouse 2018-11-02  848  		return;
1707add815519d Jordan Crouse 2018-11-02  849  
1707add815519d Jordan Crouse 2018-11-02  850  	for (i = 0; i < A6XX_NUM_SHADER_BANKS; i++) {
1707add815519d Jordan Crouse 2018-11-02  851  		in += CRASHDUMP_WRITE(in, REG_A6XX_HLSQ_DBG_READ_SEL,
1707add815519d Jordan Crouse 2018-11-02  852  			(block->type << 8) | i);
1707add815519d Jordan Crouse 2018-11-02  853  
1707add815519d Jordan Crouse 2018-11-02  854  		in += CRASHDUMP_READ(in, REG_A6XX_HLSQ_DBG_AHB_READ_APERTURE,
1707add815519d Jordan Crouse 2018-11-02  855  			block->size, dumper->iova + A6XX_CD_DATA_OFFSET);
64d6255650d4e0 Connor Abbott 2024-01-25  856  
64d6255650d4e0 Connor Abbott 2024-01-25  857  		out += block->size * sizeof(u32);
1707add815519d Jordan Crouse 2018-11-02  858  	}
1707add815519d Jordan Crouse 2018-11-02  859  
1707add815519d Jordan Crouse 2018-11-02  860  	CRASHDUMP_FINI(in);
1707add815519d Jordan Crouse 2018-11-02  861  
1707add815519d Jordan Crouse 2018-11-02  862  	if (a6xx_crashdumper_run(gpu, dumper))
1707add815519d Jordan Crouse 2018-11-02  863  		return;
1707add815519d Jordan Crouse 2018-11-02  864  
1707add815519d Jordan Crouse 2018-11-02  865  	obj->handle = block;
d6852b4b2d0140 Jordan Crouse 2018-11-02  866  	obj->data = state_kmemdup(a6xx_state, dumper->ptr + A6XX_CD_DATA_OFFSET,
d6852b4b2d0140 Jordan Crouse 2018-11-02  867  		datasize);
1707add815519d Jordan Crouse 2018-11-02  868  }
1707add815519d Jordan Crouse 2018-11-02  869  

:::::: The code at line 843 was first introduced by commit
:::::: 64d6255650d4e0ff816cd303a43685f65c5a0dbb drm/msm: More fully implement devcoredump for a7xx

:::::: TO: Connor Abbott <cwabbott0@xxxxxxxxx>
:::::: CC: Rob Clark <robdclark@xxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux