Hi Vaishnav, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on vkoul-dmaengine/next] [also build test WARNING on broonie-spi/for-next linus/master v6.0-rc2 next-20220822] [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/Vaishnav-Achath/spi-spi-omap2-mcspi-Use-EOW-interrupt-for-transfer-completion/20220822-171807 base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git next config: arc-randconfig-r043-20220821 (https://download.01.org/0day-ci/archive/20220822/202208222100.SKGSz2m9-lkp@xxxxxxxxx/config) compiler: arc-elf-gcc (GCC) 12.1.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 # https://github.com/intel-lab-lkp/linux/commit/492d819558f7cb9fb64d860042c6ca17a054c3f7 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Vaishnav-Achath/spi-spi-omap2-mcspi-Use-EOW-interrupt-for-transfer-completion/20220822-171807 git checkout 492d819558f7cb9fb64d860042c6ca17a054c3f7 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash drivers/spi/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): drivers/spi/spi-omap2-mcspi.c: In function 'omap2_mcspi_txrx_dma': >> drivers/spi/spi-omap2-mcspi.c:549:34: warning: variable 'mcspi_dma' set but not used [-Wunused-but-set-variable] 549 | struct omap2_mcspi_dma *mcspi_dma; | ^~~~~~~~~ vim +/mcspi_dma +549 drivers/spi/spi-omap2-mcspi.c d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 543 d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 544 static unsigned d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 545 omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer) d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 546 { d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 547 struct omap2_mcspi *mcspi; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 548 struct omap2_mcspi_cs *cs = spi->controller_state; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 @549 struct omap2_mcspi_dma *mcspi_dma; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 550 unsigned int count; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 551 u8 *rx; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 552 const u8 *tx; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 553 struct dma_slave_config cfg; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 554 enum dma_slave_buswidth width; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 555 unsigned es; e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 556 void __iomem *chstat_reg; d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 557 int wait_res; 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 558 int ret; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 559 d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 560 mcspi = spi_master_get_devdata(spi->master); d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 561 mcspi_dma = &mcspi->dma_channels[spi->chip_select]; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 562 d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 563 if (cs->word_len <= 8) { d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 564 width = DMA_SLAVE_BUSWIDTH_1_BYTE; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 565 es = 1; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 566 } else if (cs->word_len <= 16) { d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 567 width = DMA_SLAVE_BUSWIDTH_2_BYTES; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 568 es = 2; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 569 } else { d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 570 width = DMA_SLAVE_BUSWIDTH_4_BYTES; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 571 es = 4; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 572 } d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 573 d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 574 count = xfer->len; d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 575 d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 576 memset(&cfg, 0, sizeof(cfg)); d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 577 cfg.src_addr = cs->phys + OMAP2_MCSPI_RX0; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 578 cfg.dst_addr = cs->phys + OMAP2_MCSPI_TX0; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 579 cfg.src_addr_width = width; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 580 cfg.dst_addr_width = width; baf8b9f8d260c5 drivers/spi/spi-omap2-mcspi.c Vignesh R 2019-01-15 581 cfg.src_maxburst = 1; baf8b9f8d260c5 drivers/spi/spi-omap2-mcspi.c Vignesh R 2019-01-15 582 cfg.dst_maxburst = 1; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 583 d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 584 rx = xfer->rx_buf; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 585 tx = xfer->tx_buf; d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 586 89e8b9cb846515 drivers/spi/spi-omap2-mcspi.c Vignesh R 2018-10-15 587 mcspi->slave_aborted = false; 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 588 reinit_completion(&mcspi->txrxdone); 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 589 mcspi_write_reg(spi->master, OMAP2_MCSPI_IRQENABLE, OMAP2_MCSPI_IRQSTATUS_EOW); 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 590 if (tx) d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 591 omap2_mcspi_tx_dma(spi, xfer, cfg); d7b4394e780b02 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-09-11 592 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 593 if (rx) e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 594 count = omap2_mcspi_rx_dma(spi, xfer, cfg, es); e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 595 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 596 ret = mcspi_wait_for_completion(mcspi, &mcspi->txrxdone); 89e8b9cb846515 drivers/spi/spi-omap2-mcspi.c Vignesh R 2018-10-15 597 omap2_mcspi_set_dma_req(spi, 0, 0); 89e8b9cb846515 drivers/spi/spi-omap2-mcspi.c Vignesh R 2018-10-15 598 if (ret || mcspi->slave_aborted) 89e8b9cb846515 drivers/spi/spi-omap2-mcspi.c Vignesh R 2018-10-15 599 return 0; d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 600 e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 601 /* for TX_ONLY mode, be sure all words have shifted out */ 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 602 if (tx && !rx) { d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 603 chstat_reg = cs->base + OMAP2_MCSPI_CHSTAT0; d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 604 if (mcspi->fifo_depth > 0) { 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 605 wait_res = mcspi_wait_for_reg_bit(chstat_reg, OMAP2_MCSPI_CHSTAT_TXFFE); d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 606 if (wait_res < 0) d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 607 dev_err(&spi->dev, "TXFFE timed out\n"); d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 608 } else { 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 609 wait_res = mcspi_wait_for_reg_bit(chstat_reg, OMAP2_MCSPI_CHSTAT_TXS); d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 610 if (wait_res < 0) e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 611 dev_err(&spi->dev, "TXS timed out\n"); d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 612 } 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 613 if (wait_res >= 0 && (mcspi_wait_for_reg_bit(chstat_reg, d33f473dcd8e69 drivers/spi/spi-omap2-mcspi.c Illia Smyrnov 2013-06-17 614 OMAP2_MCSPI_CHSTAT_EOT) < 0)) e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 615 dev_err(&spi->dev, "EOT timed out\n"); e47a682ace0cd5 drivers/spi/spi-omap2-mcspi.c Shubhrajyoti D 2012-11-06 616 } 492d819558f7cb drivers/spi/spi-omap2-mcspi.c Vaishnav Achath 2022-08-22 617 ccdc7bf925731e drivers/spi/omap2_mcspi.c Samuel Ortiz 2007-07-17 618 return count; ccdc7bf925731e drivers/spi/omap2_mcspi.c Samuel Ortiz 2007-07-17 619 } ccdc7bf925731e drivers/spi/omap2_mcspi.c Samuel Ortiz 2007-07-17 620 -- 0-DAY CI Kernel Test Service https://01.org/lkp