[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202501201917.lnFCnpB0-lkp@intel.com>
Date: Mon, 20 Jan 2025 19:35:57 +0800
From: kernel test robot <lkp@...el.com>
To: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Andrzej Hajda <a.hajda@...sung.com>
Subject: drivers/video/fbdev/mmp/hw/mmp_spi.c:31: warning: expecting
prototype for spi_write(). Prototype was for lcd_spi_write() instead
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ffd294d346d185b70e28b1a28abe367bbfe53c04
commit: dd90e9ae55a1e7efd3ac036afe9f7ae7bb64d39d video: fbdev: mmp: add COMPILE_TEST support
date: 5 years ago
config: csky-randconfig-r026-20230823 (https://download.01.org/0day-ci/archive/20250120/202501201917.lnFCnpB0-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250120/202501201917.lnFCnpB0-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501201917.lnFCnpB0-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/video/fbdev/mmp/hw/mmp_spi.c:31: warning: Function parameter or struct member 'spi' not described in 'lcd_spi_write'
>> drivers/video/fbdev/mmp/hw/mmp_spi.c:31: warning: expecting prototype for spi_write(). Prototype was for lcd_spi_write() instead
vim +31 drivers/video/fbdev/mmp/hw/mmp_spi.c
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 17
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 18 /**
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 19 * spi_write - write command to the SPI port
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 20 * @data: can be 8/16/32-bit, MSB justified data to write.
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 21 * @len: data length.
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 22 *
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 23 * Wait bus transfer complete IRQ.
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 24 * The caller is expected to perform the necessary locking.
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 25 *
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 26 * Returns:
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 27 * %-ETIMEDOUT timeout occurred
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 28 * 0 success
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 29 */
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 30 static inline int lcd_spi_write(struct spi_device *spi, u32 data)
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 @31 {
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 32 int timeout = 100000, isr, ret = 0;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 33 u32 tmp;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 34 void *reg_base =
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 35 *(void **)spi_master_get_devdata(spi->master);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 36
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 37 /* clear ISR */
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 38 writel_relaxed(~SPI_IRQ_MASK, reg_base + SPU_IRQ_ISR);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 39
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 40 switch (spi->bits_per_word) {
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 41 case 8:
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 42 writel_relaxed((u8)data, reg_base + LCD_SPU_SPI_TXDATA);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 43 break;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 44 case 16:
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 45 writel_relaxed((u16)data, reg_base + LCD_SPU_SPI_TXDATA);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 46 break;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 47 case 32:
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 48 writel_relaxed((u32)data, reg_base + LCD_SPU_SPI_TXDATA);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 49 break;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 50 default:
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 51 dev_err(&spi->dev, "Wrong spi bit length\n");
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 52 }
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 53
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 54 /* SPI start to send command */
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 55 tmp = readl_relaxed(reg_base + LCD_SPU_SPI_CTRL);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 56 tmp &= ~CFG_SPI_START_MASK;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 57 tmp |= CFG_SPI_START(1);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 58 writel(tmp, reg_base + LCD_SPU_SPI_CTRL);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 59
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 60 isr = readl_relaxed(reg_base + SPU_IRQ_ISR);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 61 while (!(isr & SPI_IRQ_ENA_MASK)) {
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 62 udelay(100);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 63 isr = readl_relaxed(reg_base + SPU_IRQ_ISR);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 64 if (!--timeout) {
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 65 ret = -ETIMEDOUT;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 66 dev_err(&spi->dev, "spi cmd send time out\n");
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 67 break;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 68 }
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 69 }
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 70
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 71 tmp = readl_relaxed(reg_base + LCD_SPU_SPI_CTRL);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 72 tmp &= ~CFG_SPI_START_MASK;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 73 tmp |= CFG_SPI_START(0);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 74 writel_relaxed(tmp, reg_base + LCD_SPU_SPI_CTRL);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 75
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 76 writel_relaxed(~SPI_IRQ_MASK, reg_base + SPU_IRQ_ISR);
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 77
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 78 return ret;
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 79 }
641b4b1b6a7cb4 drivers/video/mmp/hw/mmp_spi.c Zhou Zhu 2013-02-21 80
:::::: The code at line 31 was first introduced by commit
:::::: 641b4b1b6a7cb4ab21cfd9dd7b93a1162eae4501 video: mmpdisp: add spi port in display controller
:::::: TO: Zhou Zhu <zzhu3@...vell.com>
:::::: CC: Linus Torvalds <torvalds@...ux-foundation.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists