lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Wed, 26 Jan 2022 03:28:15 +0800
From:   kernel test robot <lkp@...el.com>
To:     Li-hao Kuo <lhjeff911@...il.com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Mark Brown <broonie@...nel.org>
Subject: [broonie-misc:spi-5.18 8/9] drivers/spi/spi-sunplus-sp7021.c:127:5:
 warning: no previous prototype for 'sp7021_spi_slave_tx'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git spi-5.18
head:   a708078eeb992799161e794d9c569cf4f725a5b0
commit: f62ca4e2a863033d9b3b5a00a0d897557c9da6c5 [8/9] spi: Add spi driver for Sunplus SP7021
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20220126/202201260353.yX7WVJXz-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git/commit/?id=f62ca4e2a863033d9b3b5a00a0d897557c9da6c5
        git remote add broonie-misc https://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc.git
        git fetch --no-tags broonie-misc spi-5.18
        git checkout f62ca4e2a863033d9b3b5a00a0d897557c9da6c5
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/spi/spi-sunplus-sp7021.c:127:5: warning: no previous prototype for 'sp7021_spi_slave_tx' [-Wmissing-prototypes]
     127 | int sp7021_spi_slave_tx(struct spi_device *spi, struct spi_transfer *xfer)
         |     ^~~~~~~~~~~~~~~~~~~
>> drivers/spi/spi-sunplus-sp7021.c:145:5: warning: no previous prototype for 'sp7021_spi_slave_rx' [-Wmissing-prototypes]
     145 | int sp7021_spi_slave_rx(struct spi_device *spi, struct spi_transfer *xfer)
         |     ^~~~~~~~~~~~~~~~~~~
>> drivers/spi/spi-sunplus-sp7021.c:163:6: warning: no previous prototype for 'sp7021_spi_master_rb' [-Wmissing-prototypes]
     163 | void sp7021_spi_master_rb(struct sp7021_spi_ctlr *pspim, unsigned int len)
         |      ^~~~~~~~~~~~~~~~~~~~
>> drivers/spi/spi-sunplus-sp7021.c:174:6: warning: no previous prototype for 'sp7021_spi_master_wb' [-Wmissing-prototypes]
     174 | void sp7021_spi_master_wb(struct sp7021_spi_ctlr *pspim, unsigned int len)
         |      ^~~~~~~~~~~~~~~~~~~~
   drivers/spi/spi-sunplus-sp7021.c:568:12: warning: 'sp7021_spi_runtime_resume' defined but not used [-Wunused-function]
     568 | static int sp7021_spi_runtime_resume(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/spi/spi-sunplus-sp7021.c:560:12: warning: 'sp7021_spi_runtime_suspend' defined but not used [-Wunused-function]
     560 | static int sp7021_spi_runtime_suspend(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/sp7021_spi_slave_tx +127 drivers/spi/spi-sunplus-sp7021.c

   126	
 > 127	int sp7021_spi_slave_tx(struct spi_device *spi, struct spi_transfer *xfer)
   128	{
   129		struct sp7021_spi_ctlr *pspim = spi_controller_get_devdata(spi->controller);
   130	
   131		reinit_completion(&pspim->slave_isr);
   132		writel(SP7021_SLAVE_DMA_EN | SP7021_SLAVE_DMA_RW | FIELD_PREP(SP7021_SLAVE_DMA_CMD, 3),
   133		       pspim->s_base + SP7021_SLAVE_DMA_CTRL_REG);
   134		writel(xfer->len, pspim->s_base + SP7021_SLAVE_DMA_LENGTH_REG);
   135		writel(xfer->tx_dma, pspim->s_base + SP7021_SLAVE_DMA_ADDR_REG);
   136		writel(readl(pspim->s_base + SP7021_DATA_RDY_REG) | SP7021_SLAVE_DATA_RDY,
   137		       pspim->s_base + SP7021_DATA_RDY_REG);
   138		if (wait_for_completion_interruptible(&pspim->isr_done)) {
   139			dev_err(&spi->dev, "%s() wait_for_completion err\n", __func__);
   140			return -EINTR;
   141		}
   142		return 0;
   143	}
   144	
 > 145	int sp7021_spi_slave_rx(struct spi_device *spi, struct spi_transfer *xfer)
   146	{
   147		struct sp7021_spi_ctlr *pspim = spi_controller_get_devdata(spi->controller);
   148		int ret = 0;
   149	
   150		reinit_completion(&pspim->isr_done);
   151		writel(SP7021_SLAVE_DMA_EN | FIELD_PREP(SP7021_SLAVE_DMA_CMD, 3),
   152		       pspim->s_base + SP7021_SLAVE_DMA_CTRL_REG);
   153		writel(xfer->len, pspim->s_base + SP7021_SLAVE_DMA_LENGTH_REG);
   154		writel(xfer->rx_dma, pspim->s_base + SP7021_SLAVE_DMA_ADDR_REG);
   155		if (wait_for_completion_interruptible(&pspim->isr_done)) {
   156			dev_err(&spi->dev, "%s() wait_for_completion err\n", __func__);
   157			return -EINTR;
   158		}
   159		writel(SP7021_SLAVE_SW_RST, pspim->s_base + SP7021_SLAVE_DMA_CTRL_REG);
   160		return ret;
   161	}
   162	
 > 163	void sp7021_spi_master_rb(struct sp7021_spi_ctlr *pspim, unsigned int len)
   164	{
   165		int i;
   166	
   167		for (i = 0; i < len; i++) {
   168			pspim->rx_buf[pspim->rx_cur_len] =
   169				readl(pspim->m_base + SP7021_FIFO_REG);
   170			pspim->rx_cur_len++;
   171		}
   172	}
   173	
 > 174	void sp7021_spi_master_wb(struct sp7021_spi_ctlr *pspim, unsigned int len)
   175	{
   176		int i;
   177	
   178		for (i = 0; i < len; i++) {
   179			writel(pspim->tx_buf[pspim->tx_cur_len],
   180			       pspim->m_base + SP7021_FIFO_REG);
   181			pspim->tx_cur_len++;
   182		}
   183	}
   184	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ