All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Cai Huoqing <caihuoqing@baidu.com>,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
	nicolas.toromanoff@st.com
Cc: kbuild-all@lists.01.org, linux-crypto@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	Cai Huoqing <caihuoqing@baidu.com>
Subject: Re: [PATCH 2/2] crypto: stm32 - open the configuration for COMPILE_TEST
Date: Fri, 27 Aug 2021 04:07:24 +0800	[thread overview]
Message-ID: <202108270336.4KCayWNU-lkp@intel.com> (raw)
In-Reply-To: <20210825112147.2669-3-caihuoqing@baidu.com>

[-- Attachment #1: Type: text/plain, Size: 9234 bytes --]

Hi Cai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master stm32/stm32-next v5.14-rc7 next-20210826]
[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]

url:    https://github.com/0day-ci/linux/commits/Cai-Huoqing/crypto-stm32-Add-support-of-COMPILE_TEST/20210825-192234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: parisc-randconfig-r035-20210827 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/ee7c38e84d0080bed97a670609a489b42494c16f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cai-Huoqing/crypto-stm32-Add-support-of-COMPILE_TEST/20210825-192234
        git checkout ee7c38e84d0080bed97a670609a489b42494c16f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_dma_send':
>> drivers/crypto/stm32/stm32-hash.c:617:25: error: implicit declaration of function 'writesl'; did you mean 'writel'? [-Werror=implicit-function-declaration]
     617 |                         writesl(hdev->io_base + HASH_DIN, buffer,
         |                         ^~~~~~~
         |                         writel
   cc1: some warnings being treated as errors


vim +617 drivers/crypto/stm32/stm32-hash.c

8a1012d3f2abce lionel.debieve@st.com 2017-07-13  542  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  543  static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  544  {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  545  	struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  546  	struct scatterlist sg[1], *tsg;
532f419cde077f Arnd Bergmann         2017-09-12  547  	int err = 0, len = 0, reg, ncp = 0;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  548  	unsigned int i;
532f419cde077f Arnd Bergmann         2017-09-12  549  	u32 *buffer = (void *)rctx->buffer;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  550  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  551  	rctx->sg = hdev->req->src;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  552  	rctx->total = hdev->req->nbytes;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  553  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  554  	rctx->nents = sg_nents(rctx->sg);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  555  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  556  	if (rctx->nents < 0)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  557  		return -EINVAL;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  558  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  559  	stm32_hash_write_ctrl(hdev);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  560  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  561  	if (hdev->flags & HASH_FLAGS_HMAC) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  562  		err = stm32_hash_hmac_dma_send(hdev);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  563  		if (err != -EINPROGRESS)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  564  			return err;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  565  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  566  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  567  	for_each_sg(rctx->sg, tsg, rctx->nents, i) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  568  		len = sg->length;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  569  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  570  		sg[0] = *tsg;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  571  		if (sg_is_last(sg)) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  572  			if (hdev->dma_mode == 1) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  573  				len = (ALIGN(sg->length, 16) - 16);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  574  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  575  				ncp = sg_pcopy_to_buffer(
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  576  					rctx->sg, rctx->nents,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  577  					rctx->buffer, sg->length - len,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  578  					rctx->total - sg->length + len);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  579  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  580  				sg->length = len;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  581  			} else {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  582  				if (!(IS_ALIGNED(sg->length, sizeof(u32)))) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  583  					len = sg->length;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  584  					sg->length = ALIGN(sg->length,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  585  							   sizeof(u32));
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  586  				}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  587  			}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  588  		}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  589  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  590  		rctx->dma_ct = dma_map_sg(hdev->dev, sg, 1,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  591  					  DMA_TO_DEVICE);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  592  		if (rctx->dma_ct == 0) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  593  			dev_err(hdev->dev, "dma_map_sg error\n");
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  594  			return -ENOMEM;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  595  		}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  596  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  597  		err = stm32_hash_xmit_dma(hdev, sg, len,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  598  					  !sg_is_last(sg));
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  599  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  600  		dma_unmap_sg(hdev->dev, sg, 1, DMA_TO_DEVICE);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  601  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  602  		if (err == -ENOMEM)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  603  			return err;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  604  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  605  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  606  	if (hdev->dma_mode == 1) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  607  		if (stm32_hash_wait_busy(hdev))
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  608  			return -ETIMEDOUT;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  609  		reg = stm32_hash_read(hdev, HASH_CR);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  610  		reg &= ~HASH_CR_DMAE;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  611  		reg |= HASH_CR_DMAA;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  612  		stm32_hash_write(hdev, HASH_CR, reg);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  613  
532f419cde077f Arnd Bergmann         2017-09-12  614  		if (ncp) {
532f419cde077f Arnd Bergmann         2017-09-12  615  			memset(buffer + ncp, 0,
532f419cde077f Arnd Bergmann         2017-09-12  616  			       DIV_ROUND_UP(ncp, sizeof(u32)) - ncp);
532f419cde077f Arnd Bergmann         2017-09-12 @617  			writesl(hdev->io_base + HASH_DIN, buffer,
532f419cde077f Arnd Bergmann         2017-09-12  618  				DIV_ROUND_UP(ncp, sizeof(u32)));
532f419cde077f Arnd Bergmann         2017-09-12  619  		}
d03d29bd1857b2 Lionel Debieve        2018-01-29  620  		stm32_hash_set_nblw(hdev, ncp);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  621  		reg = stm32_hash_read(hdev, HASH_STR);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  622  		reg |= HASH_STR_DCAL;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  623  		stm32_hash_write(hdev, HASH_STR, reg);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  624  		err = -EINPROGRESS;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  625  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  626  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  627  	if (hdev->flags & HASH_FLAGS_HMAC) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  628  		if (stm32_hash_wait_busy(hdev))
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  629  			return -ETIMEDOUT;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  630  		err = stm32_hash_hmac_dma_send(hdev);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  631  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  632  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  633  	return err;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  634  }
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  635  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38181 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Cai Huoqing <caihuoqing@baidu.com>,
	herbert@gondor.apana.org.au, davem@davemloft.net,
	mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
	nicolas.toromanoff@st.com
Cc: kbuild-all@lists.01.org, linux-crypto@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	Cai Huoqing <caihuoqing@baidu.com>
Subject: Re: [PATCH 2/2] crypto: stm32 - open the configuration for COMPILE_TEST
Date: Fri, 27 Aug 2021 04:07:24 +0800	[thread overview]
Message-ID: <202108270336.4KCayWNU-lkp@intel.com> (raw)
In-Reply-To: <20210825112147.2669-3-caihuoqing@baidu.com>

[-- Attachment #1: Type: text/plain, Size: 9234 bytes --]

Hi Cai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master stm32/stm32-next v5.14-rc7 next-20210826]
[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]

url:    https://github.com/0day-ci/linux/commits/Cai-Huoqing/crypto-stm32-Add-support-of-COMPILE_TEST/20210825-192234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: parisc-randconfig-r035-20210827 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/ee7c38e84d0080bed97a670609a489b42494c16f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cai-Huoqing/crypto-stm32-Add-support-of-COMPILE_TEST/20210825-192234
        git checkout ee7c38e84d0080bed97a670609a489b42494c16f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_dma_send':
>> drivers/crypto/stm32/stm32-hash.c:617:25: error: implicit declaration of function 'writesl'; did you mean 'writel'? [-Werror=implicit-function-declaration]
     617 |                         writesl(hdev->io_base + HASH_DIN, buffer,
         |                         ^~~~~~~
         |                         writel
   cc1: some warnings being treated as errors


vim +617 drivers/crypto/stm32/stm32-hash.c

8a1012d3f2abce lionel.debieve@st.com 2017-07-13  542  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  543  static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  544  {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  545  	struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  546  	struct scatterlist sg[1], *tsg;
532f419cde077f Arnd Bergmann         2017-09-12  547  	int err = 0, len = 0, reg, ncp = 0;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  548  	unsigned int i;
532f419cde077f Arnd Bergmann         2017-09-12  549  	u32 *buffer = (void *)rctx->buffer;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  550  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  551  	rctx->sg = hdev->req->src;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  552  	rctx->total = hdev->req->nbytes;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  553  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  554  	rctx->nents = sg_nents(rctx->sg);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  555  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  556  	if (rctx->nents < 0)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  557  		return -EINVAL;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  558  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  559  	stm32_hash_write_ctrl(hdev);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  560  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  561  	if (hdev->flags & HASH_FLAGS_HMAC) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  562  		err = stm32_hash_hmac_dma_send(hdev);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  563  		if (err != -EINPROGRESS)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  564  			return err;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  565  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  566  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  567  	for_each_sg(rctx->sg, tsg, rctx->nents, i) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  568  		len = sg->length;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  569  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  570  		sg[0] = *tsg;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  571  		if (sg_is_last(sg)) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  572  			if (hdev->dma_mode == 1) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  573  				len = (ALIGN(sg->length, 16) - 16);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  574  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  575  				ncp = sg_pcopy_to_buffer(
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  576  					rctx->sg, rctx->nents,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  577  					rctx->buffer, sg->length - len,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  578  					rctx->total - sg->length + len);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  579  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  580  				sg->length = len;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  581  			} else {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  582  				if (!(IS_ALIGNED(sg->length, sizeof(u32)))) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  583  					len = sg->length;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  584  					sg->length = ALIGN(sg->length,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  585  							   sizeof(u32));
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  586  				}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  587  			}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  588  		}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  589  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  590  		rctx->dma_ct = dma_map_sg(hdev->dev, sg, 1,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  591  					  DMA_TO_DEVICE);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  592  		if (rctx->dma_ct == 0) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  593  			dev_err(hdev->dev, "dma_map_sg error\n");
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  594  			return -ENOMEM;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  595  		}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  596  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  597  		err = stm32_hash_xmit_dma(hdev, sg, len,
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  598  					  !sg_is_last(sg));
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  599  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  600  		dma_unmap_sg(hdev->dev, sg, 1, DMA_TO_DEVICE);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  601  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  602  		if (err == -ENOMEM)
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  603  			return err;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  604  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  605  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  606  	if (hdev->dma_mode == 1) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  607  		if (stm32_hash_wait_busy(hdev))
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  608  			return -ETIMEDOUT;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  609  		reg = stm32_hash_read(hdev, HASH_CR);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  610  		reg &= ~HASH_CR_DMAE;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  611  		reg |= HASH_CR_DMAA;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  612  		stm32_hash_write(hdev, HASH_CR, reg);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  613  
532f419cde077f Arnd Bergmann         2017-09-12  614  		if (ncp) {
532f419cde077f Arnd Bergmann         2017-09-12  615  			memset(buffer + ncp, 0,
532f419cde077f Arnd Bergmann         2017-09-12  616  			       DIV_ROUND_UP(ncp, sizeof(u32)) - ncp);
532f419cde077f Arnd Bergmann         2017-09-12 @617  			writesl(hdev->io_base + HASH_DIN, buffer,
532f419cde077f Arnd Bergmann         2017-09-12  618  				DIV_ROUND_UP(ncp, sizeof(u32)));
532f419cde077f Arnd Bergmann         2017-09-12  619  		}
d03d29bd1857b2 Lionel Debieve        2018-01-29  620  		stm32_hash_set_nblw(hdev, ncp);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  621  		reg = stm32_hash_read(hdev, HASH_STR);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  622  		reg |= HASH_STR_DCAL;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  623  		stm32_hash_write(hdev, HASH_STR, reg);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  624  		err = -EINPROGRESS;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  625  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  626  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  627  	if (hdev->flags & HASH_FLAGS_HMAC) {
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  628  		if (stm32_hash_wait_busy(hdev))
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  629  			return -ETIMEDOUT;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  630  		err = stm32_hash_hmac_dma_send(hdev);
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  631  	}
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  632  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  633  	return err;
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  634  }
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  635  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38181 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 2/2] crypto: stm32 - open the configuration for COMPILE_TEST
Date: Fri, 27 Aug 2021 04:07:24 +0800	[thread overview]
Message-ID: <202108270336.4KCayWNU-lkp@intel.com> (raw)
In-Reply-To: <20210825112147.2669-3-caihuoqing@baidu.com>

[-- Attachment #1: Type: text/plain, Size: 9541 bytes --]

Hi Cai,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master stm32/stm32-next v5.14-rc7 next-20210826]
[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]

url:    https://github.com/0day-ci/linux/commits/Cai-Huoqing/crypto-stm32-Add-support-of-COMPILE_TEST/20210825-192234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: parisc-randconfig-r035-20210827 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/ee7c38e84d0080bed97a670609a489b42494c16f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Cai-Huoqing/crypto-stm32-Add-support-of-COMPILE_TEST/20210825-192234
        git checkout ee7c38e84d0080bed97a670609a489b42494c16f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/crypto/stm32/stm32-hash.c: In function 'stm32_hash_dma_send':
>> drivers/crypto/stm32/stm32-hash.c:617:25: error: implicit declaration of function 'writesl'; did you mean 'writel'? [-Werror=implicit-function-declaration]
     617 |                         writesl(hdev->io_base + HASH_DIN, buffer,
         |                         ^~~~~~~
         |                         writel
   cc1: some warnings being treated as errors


vim +617 drivers/crypto/stm32/stm32-hash.c

8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  542  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  543  static int stm32_hash_dma_send(struct stm32_hash_dev *hdev)
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  544  {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  545  	struct stm32_hash_request_ctx *rctx = ahash_request_ctx(hdev->req);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  546  	struct scatterlist sg[1], *tsg;
532f419cde077f Arnd Bergmann         2017-09-12  547  	int err = 0, len = 0, reg, ncp = 0;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  548  	unsigned int i;
532f419cde077f Arnd Bergmann         2017-09-12  549  	u32 *buffer = (void *)rctx->buffer;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  550  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  551  	rctx->sg = hdev->req->src;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  552  	rctx->total = hdev->req->nbytes;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  553  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  554  	rctx->nents = sg_nents(rctx->sg);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  555  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  556  	if (rctx->nents < 0)
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  557  		return -EINVAL;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  558  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  559  	stm32_hash_write_ctrl(hdev);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  560  
8a1012d3f2abce lionel.debieve@st.com 2017-07-13  561  	if (hdev->flags & HASH_FLAGS_HMAC) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  562  		err = stm32_hash_hmac_dma_send(hdev);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  563  		if (err != -EINPROGRESS)
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  564  			return err;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  565  	}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  566  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  567  	for_each_sg(rctx->sg, tsg, rctx->nents, i) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  568  		len = sg->length;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  569  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  570  		sg[0] = *tsg;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  571  		if (sg_is_last(sg)) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  572  			if (hdev->dma_mode == 1) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  573  				len = (ALIGN(sg->length, 16) - 16);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  574  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  575  				ncp = sg_pcopy_to_buffer(
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  576  					rctx->sg, rctx->nents,
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  577  					rctx->buffer, sg->length - len,
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  578  					rctx->total - sg->length + len);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  579  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  580  				sg->length = len;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  581  			} else {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  582  				if (!(IS_ALIGNED(sg->length, sizeof(u32)))) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  583  					len = sg->length;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  584  					sg->length = ALIGN(sg->length,
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  585  							   sizeof(u32));
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  586  				}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  587  			}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  588  		}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  589  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  590  		rctx->dma_ct = dma_map_sg(hdev->dev, sg, 1,
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  591  					  DMA_TO_DEVICE);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  592  		if (rctx->dma_ct == 0) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  593  			dev_err(hdev->dev, "dma_map_sg error\n");
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  594  			return -ENOMEM;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  595  		}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  596  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  597  		err = stm32_hash_xmit_dma(hdev, sg, len,
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  598  					  !sg_is_last(sg));
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  599  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  600  		dma_unmap_sg(hdev->dev, sg, 1, DMA_TO_DEVICE);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  601  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  602  		if (err == -ENOMEM)
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  603  			return err;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  604  	}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  605  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  606  	if (hdev->dma_mode == 1) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  607  		if (stm32_hash_wait_busy(hdev))
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  608  			return -ETIMEDOUT;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  609  		reg = stm32_hash_read(hdev, HASH_CR);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  610  		reg &= ~HASH_CR_DMAE;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  611  		reg |= HASH_CR_DMAA;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  612  		stm32_hash_write(hdev, HASH_CR, reg);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  613  
532f419cde077f Arnd Bergmann         2017-09-12  614  		if (ncp) {
532f419cde077f Arnd Bergmann         2017-09-12  615  			memset(buffer + ncp, 0,
532f419cde077f Arnd Bergmann         2017-09-12  616  			       DIV_ROUND_UP(ncp, sizeof(u32)) - ncp);
532f419cde077f Arnd Bergmann         2017-09-12 @617  			writesl(hdev->io_base + HASH_DIN, buffer,
532f419cde077f Arnd Bergmann         2017-09-12  618  				DIV_ROUND_UP(ncp, sizeof(u32)));
532f419cde077f Arnd Bergmann         2017-09-12  619  		}
d03d29bd1857b2 Lionel Debieve        2018-01-29  620  		stm32_hash_set_nblw(hdev, ncp);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  621  		reg = stm32_hash_read(hdev, HASH_STR);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  622  		reg |= HASH_STR_DCAL;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  623  		stm32_hash_write(hdev, HASH_STR, reg);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  624  		err = -EINPROGRESS;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  625  	}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  626  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  627  	if (hdev->flags & HASH_FLAGS_HMAC) {
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  628  		if (stm32_hash_wait_busy(hdev))
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  629  			return -ETIMEDOUT;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  630  		err = stm32_hash_hmac_dma_send(hdev);
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  631  	}
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  632  
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  633  	return err;
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  634  }
8a1012d3f2abce lionel.debieve(a)st.com 2017-07-13  635  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38181 bytes --]

  reply	other threads:[~2021-08-26 20:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 11:21 [PATCH 0/2] crypto: stm32 - Add support of COMPILE_TEST Cai Huoqing
2021-08-25 11:21 ` Cai Huoqing
2021-08-25 11:21 ` [PATCH 1/2] " Cai Huoqing
2021-08-25 11:21   ` Cai Huoqing
2021-08-25 11:21 ` [PATCH 2/2] crypto: stm32 - open the configuration for COMPILE_TEST Cai Huoqing
2021-08-25 11:21   ` Cai Huoqing
2021-08-26 20:07   ` kernel test robot [this message]
2021-08-26 20:07     ` kernel test robot
2021-08-26 20:07     ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202108270336.4KCayWNU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=caihuoqing@baidu.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nicolas.toromanoff@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.