All of lore.kernel.org
 help / color / mirror / Atom feed
* [broonie-spi:for-next 4/22] drivers/spi/spi-amd.c:695:9: warning: variable 'ret' is uninitialized when used here
@ 2025-01-11 16:08 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-01-11 16:08 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: llvm, oe-kbuild-all, linux-spi, Mark Brown

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
head:   fd85b6b7bc53409d0be82763419bdcdaa48f2c91
commit: e6204f39fe3a7b4538815a2d778b601bd543649e [4/22] spi: amd: Drop redundant check
config: i386-randconfig-005-20250111 (https://download.01.org/0day-ci/archive/20250111/202501112315.ugYQ7Ce7-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501112315.ugYQ7Ce7-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501112315.ugYQ7Ce7-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/spi/spi-amd.c:695:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
     695 |         return ret;
         |                ^~~
   drivers/spi/spi-amd.c:673:9: note: initialize the variable 'ret' to silence this warning
     673 |         int ret;
         |                ^
         |                 = 0
   1 warning generated.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for FB_IOMEM_HELPERS
   Depends on [n]: HAS_IOMEM [=y] && FB_CORE [=n]
   Selected by [m]:
   - DRM_XE_DISPLAY [=y] && HAS_IOMEM [=y] && DRM [=m] && DRM_XE [=m] && DRM_XE [=m]=m [=m] && HAS_IOPORT [=y]


vim +/ret +695 drivers/spi/spi-amd.c

9674f1694e644a Raju Rangoju  2024-09-25  668  
6defadbe6cbc3a Raju Rangoju  2024-02-29  669  static int amd_spi_exec_mem_op(struct spi_mem *mem,
6defadbe6cbc3a Raju Rangoju  2024-02-29  670  			       const struct spi_mem_op *op)
6defadbe6cbc3a Raju Rangoju  2024-02-29  671  {
6defadbe6cbc3a Raju Rangoju  2024-02-29  672  	struct amd_spi *amd_spi;
6defadbe6cbc3a Raju Rangoju  2024-02-29  673  	int ret;
6defadbe6cbc3a Raju Rangoju  2024-02-29  674  
6defadbe6cbc3a Raju Rangoju  2024-02-29  675  	amd_spi = spi_controller_get_devdata(mem->spi->controller);
6defadbe6cbc3a Raju Rangoju  2024-02-29  676  
e6204f39fe3a7b Miquel Raynal 2024-12-24  677  	amd_set_spi_freq(amd_spi, op->max_freq);
6defadbe6cbc3a Raju Rangoju  2024-02-29  678  
9674f1694e644a Raju Rangoju  2024-09-25  679  	if (amd_spi->version == AMD_SPI_V2)
9674f1694e644a Raju Rangoju  2024-09-25  680  		amd_set_spi_addr_mode(amd_spi, op);
9674f1694e644a Raju Rangoju  2024-09-25  681  
6defadbe6cbc3a Raju Rangoju  2024-02-29  682  	switch (op->data.dir) {
6defadbe6cbc3a Raju Rangoju  2024-02-29  683  	case SPI_MEM_DATA_IN:
6defadbe6cbc3a Raju Rangoju  2024-02-29  684  		amd_spi_mem_data_in(amd_spi, op);
6defadbe6cbc3a Raju Rangoju  2024-02-29  685  		break;
6defadbe6cbc3a Raju Rangoju  2024-02-29  686  	case SPI_MEM_DATA_OUT:
6defadbe6cbc3a Raju Rangoju  2024-02-29  687  		fallthrough;
6defadbe6cbc3a Raju Rangoju  2024-02-29  688  	case SPI_MEM_NO_DATA:
6defadbe6cbc3a Raju Rangoju  2024-02-29  689  		amd_spi_mem_data_out(amd_spi, op);
6defadbe6cbc3a Raju Rangoju  2024-02-29  690  		break;
6defadbe6cbc3a Raju Rangoju  2024-02-29  691  	default:
6defadbe6cbc3a Raju Rangoju  2024-02-29  692  		ret = -EOPNOTSUPP;
6defadbe6cbc3a Raju Rangoju  2024-02-29  693  	}
6defadbe6cbc3a Raju Rangoju  2024-02-29  694  
6defadbe6cbc3a Raju Rangoju  2024-02-29 @695  	return ret;
6defadbe6cbc3a Raju Rangoju  2024-02-29  696  }
6defadbe6cbc3a Raju Rangoju  2024-02-29  697  

:::::: The code at line 695 was first introduced by commit
:::::: 6defadbe6cbc3a87dc39c119a6748d19bfba0544 spi: spi_amd: Add support for SPI MEM framework

:::::: TO: Raju Rangoju <Raju.Rangoju@amd.com>
:::::: CC: Mark Brown <broonie@kernel.org>

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

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

only message in thread, other threads:[~2025-01-11 16:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-11 16:08 [broonie-spi:for-next 4/22] drivers/spi/spi-amd.c:695:9: warning: variable 'ret' is uninitialized when used here kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.