Skip to contentSkip to conversation

drivers/i3c/internals.h:35:9: error: implicit declaration of function 'writesl'

PATCH kernel test robot 2 participants 2 messages Jul 14, 2025 – Jul 15, 2025

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/g3s/i3c
head:   96358bcce0f6b8c20c9453ca17d3ad1d16515fd4
commit: 8af3723cb0b4ec9f1f4442b617b1990ec0302c8e [7/19] i3c: master: Add inline i3c_readl_fifo() and i3c_writel_fifo()
config: x86_64-buildonly-randconfig-003-20250714 (https://download.01.org/0day-ci/archive/20250715/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250715/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from drivers/i3c/master.c:21:
drivers/i3c/internals.h: In function 'i3c_writel_fifo':

>> drivers/i3c/internals.h:35:9: error: implicit declaration of function 'writesl' [-Werror=implicit-function-declaration]
      35 |         writesl(addr, buf, nbytes / 4);
         |         ^~~~~~~
>> drivers/i3c/internals.h:40:17: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]
      40 |                 writel(tmp, addr);
         |                 ^~~~~~
   drivers/i3c/internals.h: In function 'i3c_readl_fifo':
>> drivers/i3c/internals.h:53:9: error: implicit declaration of function 'readsl' [-Werror=implicit-function-declaration]
      53 |         readsl(addr, buf, nbytes / 4);
         |         ^~~~~~
>> drivers/i3c/internals.h:57:23: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
      57 |                 tmp = readl(addr);
         |                       ^~~~~

cc1: some warnings being treated as errors

vim +/writesl +35 drivers/i3c/internals.h

25
26 /**
27 * i3c_writel_fifo - Write data buffer to 32bit FIFO
28 * @addr: FIFO Address to write to
29 * @buf: Pointer to the data bytes to write
30 * @nbytes: Number of bytes to write
31 */
32 static inline void i3c_writel_fifo(void __iomem *addr, const void *buf,
33 int nbytes)
34 {

  > 35		writesl(addr, buf, nbytes / 4);
    36		if (nbytes & 3) {
    37			u32 tmp = 0;
    38	
    39			memcpy(&tmp, buf + (nbytes & ~3), nbytes & 3);
  > 40			writel(tmp, addr);
    41		}
    42	}
    43	
    44	/**
    45	 * i3c_readl_fifo - Read data buffer from 32bit FIFO
    46	 * @addr: FIFO Address to read from
    47	 * @buf: Pointer to the buffer to store read bytes
    48	 * @nbytes: Number of bytes to read
    49	 */
    50	static inline void i3c_readl_fifo(const void __iomem *addr, void *buf,
    51					  int nbytes)
    52	{
  > 53		readsl(addr, buf, nbytes / 4);
    54		if (nbytes & 3) {
    55			u32 tmp;
    56	
  > 57			tmp = readl(addr);
    58			memcpy(buf + (nbytes & ~3), &tmp, nbytes & 3);
    59		}
    60	}
    61	
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 2 lines

config: x86_64-buildonly-randconfig-003-20250714 (https://download.01.org/0day-ci/archive/20250715/[email protected]/config)

I can't reproduce this with the above config.

Quoted 6 lines

compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250715/[email protected]/reproduce)

Quoted 1 line
Quoted 1 line

drivers/i3c/internals.h:40:17: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]

      40 |                 writel(tmp, addr);
         |                 ^~~~~~

But I added the 'linux/io.h' header to internals.h and will let the bot recheck my branch...