Re: [PATCH v2 1/6] drivers: crypto: qce: sha: Restore/save ahash state with custom struct in export/import

2021-01-13 Thread kernel test robot
Hi Thara,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master v5.11-rc3 next-20210113]
[cannot apply to sparc-next/master]
[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/Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210112-57
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: x86_64-randconfig-a013-20210113 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 
68ff52ffead2ba25cca442778ab19286000daad7)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# 
https://github.com/0day-ci/linux/commit/b7360d9135da2031f189ad275a4d7765966ac93e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210112-57
git checkout b7360d9135da2031f189ad275a4d7765966ac93e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All errors (new ones prefixed by >>):

>> drivers/crypto/qce/sha.c:166:30: error: initializing 'struct 
>> qce_sha_saved_state *' with an expression of type 'const void *' discards 
>> qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
   struct qce_sha_saved_state *import_state = in;
   ^  ~~
   1 error generated.


vim +166 drivers/crypto/qce/sha.c

   162  
   163  static int qce_ahash_import(struct ahash_request *req, const void *in)
   164  {
   165  struct qce_sha_reqctx *rctx = ahash_request_ctx(req);
 > 166  struct qce_sha_saved_state *import_state = in;
   167  
   168  memset(rctx, 0, sizeof(*rctx));
   169  rctx->count = import_state->count;
   170  rctx->buflen = import_state->pending_buflen;
   171  rctx->first_blk = import_state->first_blk;
   172  rctx->flags = import_state->flags;
   173  memcpy(rctx->buf, import_state->pending_buf, rctx->buflen);
   174  memcpy(rctx->digest, import_state->partial_digest,
   175 sizeof(rctx->digest));
   176  memcpy(rctx->byte_count, import_state->byte_count, 2);
   177  
   178  return 0;
   179  }
   180  

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


.config.gz
Description: application/gzip


Re: [PATCH v2 1/6] drivers: crypto: qce: sha: Restore/save ahash state with custom struct in export/import

2021-01-12 Thread kernel test robot
Hi Thara,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master v5.11-rc3 next-20210111]
[cannot apply to sparc-next/master]
[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/Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210112-57
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: ia64-randconfig-s032-20210111 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
# 
https://github.com/0day-ci/linux/commit/b7360d9135da2031f189ad275a4d7765966ac93e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210112-57
git checkout b7360d9135da2031f189ad275a4d7765966ac93e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


"sparse warnings: (new ones prefixed by >>)"
>> drivers/crypto/qce/sha.c:166:52: sparse: sparse: incorrect type in 
>> initializer (different modifiers) @@ expected struct qce_sha_saved_state 
>> *import_state @@ got void const *in @@
   drivers/crypto/qce/sha.c:166:52: sparse: expected struct 
qce_sha_saved_state *import_state
   drivers/crypto/qce/sha.c:166:52: sparse: got void const *in

vim +166 drivers/crypto/qce/sha.c

   162  
   163  static int qce_ahash_import(struct ahash_request *req, const void *in)
   164  {
   165  struct qce_sha_reqctx *rctx = ahash_request_ctx(req);
 > 166  struct qce_sha_saved_state *import_state = in;
   167  
   168  memset(rctx, 0, sizeof(*rctx));
   169  rctx->count = import_state->count;
   170  rctx->buflen = import_state->pending_buflen;
   171  rctx->first_blk = import_state->first_blk;
   172  rctx->flags = import_state->flags;
   173  memcpy(rctx->buf, import_state->pending_buf, rctx->buflen);
   174  memcpy(rctx->digest, import_state->partial_digest,
   175 sizeof(rctx->digest));
   176  memcpy(rctx->byte_count, import_state->byte_count, 2);
   177  
   178  return 0;
   179  }
   180  

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


.config.gz
Description: application/gzip


Re: [PATCH v2 1/6] drivers: crypto: qce: sha: Restore/save ahash state with custom struct in export/import

2021-01-11 Thread kernel test robot
Hi Thara,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master v5.11-rc3 next-20210111]
[cannot apply to sparc-next/master]
[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/Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210112-57
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.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/b7360d9135da2031f189ad275a4d7765966ac93e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Thara-Gopinath/Regression-fixes-clean-ups-in-the-Qualcomm-crypto-engine-driver/20210112-57
git checkout b7360d9135da2031f189ad275a4d7765966ac93e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=xtensa 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

   drivers/crypto/qce/sha.c: In function 'qce_ahash_import':
>> drivers/crypto/qce/sha.c:166:45: warning: initialization discards 'const' 
>> qualifier from pointer target type [-Wdiscarded-qualifiers]
 166 |  struct qce_sha_saved_state *import_state = in;
 | ^~


vim +/const +166 drivers/crypto/qce/sha.c

   162  
   163  static int qce_ahash_import(struct ahash_request *req, const void *in)
   164  {
   165  struct qce_sha_reqctx *rctx = ahash_request_ctx(req);
 > 166  struct qce_sha_saved_state *import_state = in;
   167  
   168  memset(rctx, 0, sizeof(*rctx));
   169  rctx->count = import_state->count;
   170  rctx->buflen = import_state->pending_buflen;
   171  rctx->first_blk = import_state->first_blk;
   172  rctx->flags = import_state->flags;
   173  memcpy(rctx->buf, import_state->pending_buf, rctx->buflen);
   174  memcpy(rctx->digest, import_state->partial_digest,
   175 sizeof(rctx->digest));
   176  memcpy(rctx->byte_count, import_state->byte_count, 2);
   177  
   178  return 0;
   179  }
   180  

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


.config.gz
Description: application/gzip