Re: [PATCH 3/6] spi: dw-g2: Add indirect read and write
From: kernel test robot
Date: Thu Nov 19 2026 - 19:09:07 EST
Hi Prakriti,
kernel test robot noticed the following build warnings:
[auto build test WARNING on broonie-spi/for-next]
[also build test WARNING on robh/for-next linus/master v7.4-rc3 next-20261116]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Prakriti-Sharma/dt-bindings-spi-Add-Synopsys-DWC-SSI-v2-02a-binding/20261119-153508
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link: https://lore.kernel.org/r/20261119100513.433044-4-prakriti%40synopsys.com
patch subject: [PATCH 3/6] spi: dw-g2: Add indirect read and write
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20261120/202611200702.anv4vey4-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261120/202611200702.anv4vey4-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/202611200702.anv4vey4-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
drivers/spi/spi-dw-g2-core.c: In function 'dw_spi_g2_build_ctrlr0':
drivers/spi/spi-dw-g2-core.c:226:13: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
226 | FIELD_PREP(DW_SPI_G2_CTRLR0_DFS_MASK, DW_SPI_G2_DFS_ENCODE(dfs));
| ^~~~~~~~~~
drivers/spi/spi-dw-g2-core.c: In function 'dw_spi_g2_indirect_read':
>> drivers/spi/spi-dw-g2-core.c:624:13: warning: variable 'tx_entries' set but not used [-Wunused-but-set-variable=]
624 | u32 tx_entries;
| ^~~~~~~~~~
vim +/tx_entries +624 drivers/spi/spi-dw-g2-core.c
612
613 /**
614 * dw_spi_g2_indirect_read - Execute indirect read operation
615 * @dws: Driver state
616 * @op: SPI memory operation
617 *
618 * Reads data from flash using RO (receive-only) mode.
619 * Return: 0 on success, negative error code on failure
620 */
621 static int dw_spi_g2_indirect_read(struct dw_spi_g2 *dws,
622 const struct spi_mem_op *op)
623 {
> 624 u32 tx_entries;
625 u8 dummy_buf = 0;
626 int ret;
627
628 if (!op->data.nbytes) {
629 dev_err(dws->dev, "Zero-length read not allowed\n");
630 return -EINVAL;
631 }
632
633 if (!op->data.buf.in) {
634 dev_err(dws->dev, "RX buffer is NULL\n");
635 return -EINVAL;
636 }
637
638 ret = dw_spi_g2_indirect_read_setup(dws, op);
639 if (ret)
640 return ret;
641
642 dw_spi_g2_target_enable(dws, dws->cs);
643 dw_spi_g2_enable(dws, true);
644
645 tx_entries = 0;
646
647 /* Write instruction */
648 dw_spi_g2_writel(dws->regs, DW_SPI_G2_DR0, op->cmd.opcode);
649 tx_entries++;
650
651 /* Write address as a packed 32-bit value (one FIFO entry) */
652 if (op->addr.nbytes) {
653 dw_spi_g2_writel(dws->regs, DW_SPI_G2_DR0, (u32)op->addr.val);
654 tx_entries++;
655 }
656
657 /* Assert CS - controller begins: sends TX FIFO, then receives */
658 dw_spi_g2_cs_assert(dws, dws->cs);
659
660 /* Receive data via polling */
661 ret = dw_spi_g2_xfer_fifo(dws, &dummy_buf, 0,
662 op->data.buf.in, op->data.nbytes);
663 dw_spi_g2_transfer_end(dws);
664 dw_spi_g2_controller_reset(dws);
665
666 return ret;
667 }
668
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki