[cryptodev:master 1/53] drivers/crypto/inside-secure/safexcel_hash.c:1781:25: sparse: sparse: incorrect type in assignment (different base types)

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   4fd7d7befdb531920cae8f78afd4938e4a25e421
commit: a7cf8658460edafb03438eeeb0a7d3c91572d4db [1/53] crypto: inside-secure - Added support for CRC32
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-42-g38eda53-dirty
        git checkout a7cf8658460edafb03438eeeb0a7d3c91572d4db
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

   drivers/crypto/inside-secure/safexcel_hash.c:93:41: sparse: sparse: incorrect type in assignment (different base types) @@    expected restricted __le32 @@    got icted __le32 @@
   drivers/crypto/inside-secure/safexcel_hash.c:93:41: sparse:    expected restricted __le32
   drivers/crypto/inside-secure/safexcel_hash.c:93:41: sparse:    got unsigned int
>> drivers/crypto/inside-secure/safexcel_hash.c:1781:25: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int @@    got restricted __le32unsigned int @@
>> drivers/crypto/inside-secure/safexcel_hash.c:1781:25: sparse:    expected unsigned int
>> drivers/crypto/inside-secure/safexcel_hash.c:1781:25: sparse:    got restricted __le32 [usertype]

vim +1781 drivers/crypto/inside-secure/safexcel_hash.c

  1772	
  1773	static int safexcel_crc32_init(struct ahash_request *areq)
  1774	{
  1775		struct safexcel_ahash_ctx *ctx = crypto_ahash_ctx(crypto_ahash_reqtfm(areq));
  1776		struct safexcel_ahash_req *req = ahash_request_ctx(areq);
  1777	
  1778		memset(req, 0, sizeof(*req));
  1779	
  1780		/* Start from loaded key */
> 1781		req->state[0]	= cpu_to_le32(~ctx->ipad[0]);
  1782		/* Set processed to non-zero to enable invalidation detection */
  1783		req->len	= sizeof(u32);
  1784		req->processed	= sizeof(u32);
  1785	
  1786		ctx->alg = CONTEXT_CONTROL_CRYPTO_ALG_CRC32;
  1787		req->digest = CONTEXT_CONTROL_DIGEST_XCM;
  1788		req->state_sz = sizeof(u32);
  1789		req->block_sz = sizeof(u32);
  1790	
  1791		return 0;
  1792	}
  1793	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux