Re: [PATCH 2/5] spi: cadence: Add Marvell IP modification changes

From: kernel test robot
Date: Sun Mar 31 2024 - 03:46:32 EST


Hi Witold,

kernel test robot noticed the following build errors:

[auto build test ERROR on broonie-spi/for-next]
[also build test ERROR on linus/master v6.9-rc1 next-20240328]
[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/Witold-Sadowski/spi-cadence-Add-new-bindings-documentation-for-Cadence-XSPI/20240330-035124
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link: https://lore.kernel.org/r/20240329194849.25554-3-wsadowski%40marvell.com
patch subject: [PATCH 2/5] spi: cadence: Add Marvell IP modification changes
config: i386-randconfig-141-20240330 (https://download.01.org/0day-ci/archive/20240331/202403311540.oe0vVEdr-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240331/202403311540.oe0vVEdr-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/202403311540.oe0vVEdr-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/spi/spi-cadence-xspi.c:531:15: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
531 | *buf64++ = readq(addr);
| ^
drivers/spi/spi-cadence-xspi.c:534:10: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
534 | tmp = readq(addr);
| ^
drivers/spi/spi-cadence-xspi.c:540:9: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
540 | tmp = 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(*buf64++, addr);
| ^
drivers/spi/spi-cadence-xspi.c:559:4: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
559 | writeq(tmp, addr);
| ^
drivers/spi/spi-cadence-xspi.c:565:3: error: call to undeclared function 'writeq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
565 | writeq(tmp, addr);
| ^
>> drivers/spi/spi-cadence-xspi.c:794:36: error: call to undeclared function 'spi_master_get_devdata'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
794 | struct cdns_xspi_dev *cdns_xspi = spi_master_get_devdata(spi_dev->master);
| ^
drivers/spi/spi-cadence-xspi.c:794:36: note: did you mean 'spi_mem_get_drvdata'?
include/linux/spi/spi-mem.h:224:21: note: 'spi_mem_get_drvdata' declared here
224 | static inline void *spi_mem_get_drvdata(struct spi_mem *mem)
| ^
>> drivers/spi/spi-cadence-xspi.c:794:68: error: no member named 'master' in 'struct spi_device'
794 | struct cdns_xspi_dev *cdns_xspi = spi_master_get_devdata(spi_dev->master);
| ~~~~~~~ ^
8 errors generated.


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

520
521 static void mrvl_ioreadq(void __iomem *addr, void *buf, int len)
522 {
523 int i = 0;
524 int rcount = len / 8;
525 int rcount_nf = len % 8;
526 uint64_t tmp;
527 uint64_t *buf64 = (uint64_t *)buf;
528
529 if (((uint64_t)buf % 8) == 0) {
530 for (i = 0; i < rcount; i++)
> 531 *buf64++ = readq(addr);
532 } else {
533 for (i = 0; i < rcount; i++) {
534 tmp = readq(addr);
535 memcpy(buf+(i*8), &tmp, 8);
536 }
537 }
538
539 if (rcount_nf != 0) {
540 tmp = readq(addr);
541 memcpy(buf+(i*8), &tmp, rcount_nf);
542 }
543 }
544
545 static void mrvl_iowriteq(void __iomem *addr, const void *buf, int len)
546 {
547 int i = 0;
548 int rcount = len / 8;
549 int rcount_nf = len % 8;
550 uint64_t tmp;
551 uint64_t *buf64 = (uint64_t *)buf;
552
553 if (((uint64_t)buf % 8) == 0) {
554 for (i = 0; i < rcount; i++)
> 555 writeq(*buf64++, addr);
556 } else {
557 for (i = 0; i < rcount; i++) {
558 memcpy(&tmp, buf+(i*8), 8);
559 writeq(tmp, addr);
560 }
561 }
562
563 if (rcount_nf != 0) {
564 memcpy(&tmp, buf+(i*8), rcount_nf);
565 writeq(tmp, addr);
566 }
567 }
568

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