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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202212200402.5ocuniDK-lkp@intel.com>
Date:   Tue, 20 Dec 2022 04:26:52 +0800
From:   kernel test robot <lkp@...el.com>
To:     Witold Sadowski <wsadowski@...vell.com>, broonie@...nel.org
Cc:     oe-kbuild-all@...ts.linux.dev, linux-spi@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        jpawar@...ence.com, pthombar@...ence.com, konrad@...ence.com,
        wbartczak@...vell.com, wzmuda@...vell.com, wsadowski@...vell.com
Subject: Re: [PATCH 5/7] spi: cadence: Add read access size switch

Hi Witold,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on broonie-spi/for-next]
[also build test ERROR on linus/master v6.1 next-20221219]
[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/Support-for-Marvell-modifications-for-Cadence-XSPI/20221219-224547
base:   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
patch link:    https://lore.kernel.org/r/20221219144254.20883-6-wsadowski%40marvell.com
patch subject: [PATCH 5/7] spi: cadence: Add read access size switch
config: m68k-allmodconfig
compiler: m68k-linux-gcc (GCC) 12.1.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://github.com/intel-lab-lkp/linux/commit/552a25a831f809921128f7431e7aaf71aea2778c
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Witold-Sadowski/Support-for-Marvell-modifications-for-Cadence-XSPI/20221219-224547
        git checkout 552a25a831f809921128f7431e7aaf71aea2778c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash drivers/spi/

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

All error/warnings (new ones prefixed by >>):

   drivers/spi/spi-cadence-xspi.c: In function 'cdns_ioreadq':
>> drivers/spi/spi-cadence-xspi.c:346:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     346 |         if (((uint64_t)buf % 8) == 0) {
         |              ^
>> drivers/spi/spi-cadence-xspi.c:348:36: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Werror=implicit-function-declaration]
     348 |                         *buf64++ = readq(addr);
         |                                    ^~~~~
         |                                    readb
   drivers/spi/spi-cadence-xspi.c: In function 'cdns_iowriteq':
   drivers/spi/spi-cadence-xspi.c:370:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
     370 |         if (((uint64_t)buf % 8) == 0) {
         |              ^
>> drivers/spi/spi-cadence-xspi.c:372:25: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration]
     372 |                         writeq(*buf64++, addr);
         |                         ^~~~~~
         |                         writel
   drivers/spi/spi-cadence-xspi.c: At top level:
   drivers/spi/spi-cadence-xspi.c:438:6: warning: no previous prototype for 'cdns_xspi_stig_ready' [-Wmissing-prototypes]
     438 | bool cdns_xspi_stig_ready(struct cdns_xspi_dev *cdns_xspi)
         |      ^~~~~~~~~~~~~~~~~~~~
   drivers/spi/spi-cadence-xspi.c:449:6: warning: no previous prototype for 'cdns_xspi_sdma_ready' [-Wmissing-prototypes]
     449 | bool cdns_xspi_sdma_ready(struct cdns_xspi_dev *cdns_xspi)
         |      ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +348 drivers/spi/spi-cadence-xspi.c

   337	
   338	static void cdns_ioreadq(void __iomem  *addr, void *buf, int len)
   339	{
   340		int i = 0;
   341		int rcount = len / 8;
   342		int rcount_nf = len % 8;
   343		uint64_t tmp;
   344		uint64_t *buf64 = (uint64_t *)buf;
   345	
 > 346		if (((uint64_t)buf % 8) == 0) {
   347			for (i = 0; i < rcount; i++)
 > 348				*buf64++ = readq(addr);
   349		} else {
   350			for (i = 0; i < rcount; i++) {
   351				tmp = readq(addr);
   352				memcpy(buf+(i*8), &tmp, 8);
   353			}
   354		}
   355	
   356		if (rcount_nf != 0) {
   357			tmp = readq(addr);
   358			memcpy(buf+(i*8), &tmp, rcount_nf);
   359		}
   360	}
   361	
   362	static void cdns_iowriteq(void __iomem *addr, const void *buf, int len)
   363	{
   364		int i = 0;
   365		int rcount = len / 8;
   366		int rcount_nf = len % 8;
   367		uint64_t tmp;
   368		uint64_t *buf64 = (uint64_t *)buf;
   369	
   370		if (((uint64_t)buf % 8) == 0) {
   371			for (i = 0; i < rcount; i++)
 > 372				writeq(*buf64++, addr);
   373		} else {
   374			for (i = 0; i < rcount; i++) {
   375				memcpy(&tmp, buf+(i*8), 8);
   376				writeq(tmp, addr);
   377			}
   378		}
   379	
   380		if (rcount_nf != 0) {
   381			memcpy(&tmp, buf+(i*8), rcount_nf);
   382			writeq(tmp, addr);
   383		}
   384	}
   385	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (276538 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ