[linux-next:master 1008/1677] drivers/spi/spi-cadence-xspi.c:529:12: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   cd19ac2f903276b820f5d0d89de0c896c27036ed
commit: 75128e2a14a9f443e8debdd30445f5934b5a7c83 [1008/1677] spi: cadence: Add Marvell SDMA operations
config: i386-randconfig-003-20240731 (https://download.01.org/0day-ci/archive/20240731/202407310634.bYvT0Myc-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240731/202407310634.bYvT0Myc-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/202407310634.bYvT0Myc-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/spi/spi-cadence-xspi.c:529:12: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     529 |                         u64 b = readq(addr);
         |                                 ^
   drivers/spi/spi-cadence-xspi.c:538:13: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     538 |                 tmp_buf = readq(addr);
         |                           ^
>> drivers/spi/spi-cadence-xspi.c:555:4: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     555 |                         writeq(*buffer++, addr);
         |                         ^
   drivers/spi/spi-cadence-xspi.c:563:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     563 |                 writeq(tmp_buf, addr);
         |                 ^
   4 errors generated.


vim +/readq +529 drivers/spi/spi-cadence-xspi.c

   518	
   519	static void m_ioreadq(void __iomem  *addr, void *buf, int len)
   520	{
   521		if (IS_ALIGNED((long)buf, 8) && len >= 8) {
   522			u64 full_ops = len / 8;
   523			u64 *buffer = buf;
   524	
   525			len -= full_ops * 8;
   526			buf += full_ops * 8;
   527	
   528			do {
 > 529				u64 b = readq(addr);
   530				*buffer++ = b;
   531			} while (--full_ops);
   532		}
   533	
   534	
   535		while (len) {
   536			u64 tmp_buf;
   537	
   538			tmp_buf = readq(addr);
   539			memcpy(buf, &tmp_buf, min(len, 8));
   540			len = len > 8 ? len - 8 : 0;
   541			buf += 8;
   542		}
   543	}
   544	
   545	static void m_iowriteq(void __iomem *addr, const void *buf, int len)
   546	{
   547		if (IS_ALIGNED((long)buf, 8) && len >= 8) {
   548			u64 full_ops = len / 8;
   549			const u64 *buffer = buf;
   550	
   551			len -= full_ops * 8;
   552			buf += full_ops * 8;
   553	
   554			do {
 > 555				writeq(*buffer++, addr);
   556			} while (--full_ops);
   557		}
   558	
   559		while (len) {
   560			u64 tmp_buf;
   561	
   562			memcpy(&tmp_buf, buf, min(len, 8));
   563			writeq(tmp_buf, addr);
   564			len = len > 8 ? len - 8 : 0;
   565			buf += 8;
   566		}
   567	}
   568	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux