From: kernel test robot <lkp@intel.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-spi@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [broonie-spi:for-next 4/22] drivers/spi/spi-amd.c:695:9: warning: variable 'ret' is uninitialized when used here
Date: Sun, 12 Jan 2025 00:08:52 +0800 [thread overview]
Message-ID: <202501112315.ugYQ7Ce7-lkp@intel.com> (raw)
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
reply other threads:[~2025-01-11 16:09 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=202501112315.ugYQ7Ce7-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=miquel.raynal@bootlin.com \
--cc=oe-kbuild-all@lists.linux.dev \
/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 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.