diff mbox

crypto: Allow drivers to build if COMPILE_TEST is enabled

Message ID 1444743760-15155-1-git-send-email-javier@osg.samsung.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show

Commit Message

Javier Martinez Canillas Oct. 13, 2015, 1:42 p.m. UTC
These drivers only have runtime but no build time dependencies so can be
built for testing purposes if the Kconfig COMPILE_TEST option is enabled.

This is useful to have more build coverage and make sure that drivers are
not affected by changes that could cause build regressions.

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/crypto/Kconfig | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

kernel test robot Oct. 13, 2015, 9:03 p.m. UTC | #1
Hi Javier,

[auto build test WARNING on cryptodev/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Javier-Martinez-Canillas/crypto-Allow-drivers-to-build-if-COMPILE_TEST-is-enabled/20151013-214554
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/crypto/s5p-sss.c:385:17: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/s5p-sss.c:385:17:    expected void *to
   drivers/crypto/s5p-sss.c:385:17:    got void [noderef] <asn:2>*
>> drivers/crypto/s5p-sss.c:394:9: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/s5p-sss.c:394:9:    expected void *to
   drivers/crypto/s5p-sss.c:394:9:    got void [noderef] <asn:2>*[assigned] keystart
--
>> drivers/crypto/marvell/cesa.c:327:30: sparse: incorrect type in assignment (different address spaces)
   drivers/crypto/marvell/cesa.c:327:30:    expected void [noderef] <asn:2>*sram
   drivers/crypto/marvell/cesa.c:327:30:    got void *
--
>> drivers/crypto/marvell/cipher.c:93:47: sparse: incorrect type in argument 3 (different address spaces)
   drivers/crypto/marvell/cipher.c:93:47:    expected void *buf
   drivers/crypto/marvell/cipher.c:93:47:    got void [noderef] <asn:2>*
>> drivers/crypto/marvell/cesa.h:656:26: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:656:26:    expected unsigned int [unsigned] [usertype] enc_len
   drivers/crypto/marvell/cesa.h:656:26:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cipher.c:101:17: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/marvell/cipher.c:101:17:    expected void *to
   drivers/crypto/marvell/cipher.c:101:17:    got void [noderef] <asn:2>*sram
   drivers/crypto/marvell/cipher.c:104:17: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/marvell/cipher.c:104:17:    expected void *to
   drivers/crypto/marvell/cipher.c:104:17:    got void [noderef] <asn:2>*sram
>> drivers/crypto/marvell/cipher.c:121:49: sparse: incorrect type in argument 3 (different address spaces)
   drivers/crypto/marvell/cipher.c:121:49:    expected void const *buf
   drivers/crypto/marvell/cipher.c:121:49:    got void [noderef] <asn:2>*
>> drivers/crypto/marvell/cipher.c:148:9: sparse: incorrect type in argument 2 (different address spaces)
   drivers/crypto/marvell/cipher.c:148:9:    expected void const *from
   drivers/crypto/marvell/cipher.c:148:9:    got void [noderef] <asn:2>*
>> drivers/crypto/marvell/cipher.c:246:41: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cipher.c:246:41:    expected unsigned int [unsigned] <noident>
   drivers/crypto/marvell/cipher.c:246:41:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:656:26: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:656:26:    expected unsigned int [unsigned] [usertype] enc_len
   drivers/crypto/marvell/cesa.h:656:26:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cipher.c:349:60: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/cipher.c:349:60:    expected unsigned int [unsigned] [usertype] flags
   drivers/crypto/marvell/cipher.c:349:60:    got restricted gfp_t [usertype] flags
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:631:16: sparse: cast to restricted __le32
   drivers/crypto/marvell/cipher.c:680:44: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cipher.c:680:44:    expected unsigned int [unsigned] <noident>
   drivers/crypto/marvell/cipher.c:680:44:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:644:24: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:644:24:    expected unsigned int [unsigned] [usertype] enc_p
   drivers/crypto/marvell/cesa.h:644:24:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:645:28: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:645:28:    expected unsigned int [unsigned] [usertype] enc_key_p
   drivers/crypto/marvell/cesa.h:645:28:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:646:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:646:25:    expected unsigned int [unsigned] [usertype] enc_iv
   drivers/crypto/marvell/cesa.h:646:25:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/cesa.h:648:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:648:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:648:28:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:650:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:650:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:650:29:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:651:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:651:25:    expected unsigned int [unsigned] [usertype] mac_iv
   drivers/crypto/marvell/cesa.h:651:25:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/cipher.c:184:9: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/marvell/cipher.c:184:9:    expected void *to
   drivers/crypto/marvell/cipher.c:184:9:    got void [noderef] <asn:2>*sram
--
>> drivers/crypto/marvell/hash.c:206:17: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/marvell/hash.c:206:17:    expected void *to
   drivers/crypto/marvell/hash.c:206:17:    got void [noderef] <asn:2>*
>> drivers/crypto/marvell/hash.c:220:77: sparse: incorrect type in argument 3 (different address spaces)
   drivers/crypto/marvell/hash.c:220:77:    expected void *buf
   drivers/crypto/marvell/hash.c:220:77:    got void [noderef] <asn:2>*
>> drivers/crypto/marvell/cesa.h:631:16: sparse: cast to restricted __le32
   drivers/crypto/marvell/cesa.h:663:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:663:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:663:28:    right side has type restricted __le32
>> drivers/crypto/marvell/hash.c:248:33: sparse: incorrect type in argument 2 (different address spaces)
   drivers/crypto/marvell/hash.c:248:33:    expected void const *from
   drivers/crypto/marvell/hash.c:248:33:    got void [noderef] <asn:2>*
>> drivers/crypto/marvell/hash.c:254:68: sparse: incorrect type in argument 2 (different address spaces)
   drivers/crypto/marvell/hash.c:254:68:    expected unsigned char [usertype] *buf
   drivers/crypto/marvell/hash.c:254:68:    got void [noderef] <asn:2>*
   drivers/crypto/marvell/cesa.h:670:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:670:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:670:29:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
   drivers/crypto/marvell/hash.c:269:9: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/marvell/hash.c:269:9:    expected void *to
   drivers/crypto/marvell/hash.c:269:9:    got void [noderef] <asn:2>*sram
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:644:24: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:644:24:    expected unsigned int [unsigned] [usertype] enc_p
   drivers/crypto/marvell/cesa.h:644:24:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:645:28: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:645:28:    expected unsigned int [unsigned] [usertype] enc_key_p
   drivers/crypto/marvell/cesa.h:645:28:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:646:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:646:25:    expected unsigned int [unsigned] [usertype] enc_iv
   drivers/crypto/marvell/cesa.h:646:25:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/cesa.h:648:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:648:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:648:28:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:650:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:650:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:650:29:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:651:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:651:25:    expected unsigned int [unsigned] [usertype] mac_iv
   drivers/crypto/marvell/cesa.h:651:25:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/hash.c:309:9: sparse: incorrect type in argument 1 (different address spaces)
   drivers/crypto/marvell/hash.c:309:9:    expected void *to
   drivers/crypto/marvell/hash.c:309:9:    got void [noderef] <asn:2>*sram
>> drivers/crypto/marvell/hash.c:341:32: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/hash.c:341:32:    expected restricted __be32 <noident>
   drivers/crypto/marvell/hash.c:341:32:    got unsigned int
>> drivers/crypto/marvell/hash.c:356:50: sparse: cast from restricted __be32
>> drivers/crypto/marvell/hash.c:356:48: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/hash.c:356:48:    expected restricted __be32 <noident>
   drivers/crypto/marvell/hash.c:356:48:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/hash.c:358:50: sparse: cast from restricted __be32
>> drivers/crypto/marvell/hash.c:358:50: sparse: incorrect type in argument 1 (different base types)
   drivers/crypto/marvell/hash.c:358:50:    expected unsigned int [unsigned] [usertype] val
   drivers/crypto/marvell/hash.c:358:50:    got restricted __be32 <noident>
   drivers/crypto/marvell/hash.c:358:50: sparse: cast from restricted __be32
   drivers/crypto/marvell/hash.c:358:50: sparse: cast from restricted __be32
   drivers/crypto/marvell/hash.c:358:50: sparse: cast from restricted __be32
   drivers/crypto/marvell/hash.c:358:50: sparse: cast from restricted __be32
>> drivers/crypto/marvell/hash.c:384:35: sparse: incorrect type in argument 1 (different base types)
   drivers/crypto/marvell/hash.c:384:35:    expected unsigned int [unsigned] val
   drivers/crypto/marvell/hash.c:384:35:    got restricted __be32 <noident>
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:663:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:663:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:663:28:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:670:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:670:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:670:29:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:670:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:670:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:670:29:    right side has type restricted __le32
>> drivers/crypto/marvell/hash.c:494:59: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/hash.c:494:59:    expected unsigned int [unsigned] [usertype] flags
   drivers/crypto/marvell/hash.c:494:59:    got restricted gfp_t [usertype] flags
   drivers/crypto/marvell/cesa.h:670:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:670:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:670:29:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:631:16: sparse: cast to restricted __le32
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
   drivers/crypto/marvell/hash.c:530:51: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/hash.c:530:51:    expected unsigned int [unsigned] [usertype] flags
   drivers/crypto/marvell/hash.c:530:51:    got restricted gfp_t [usertype] flags
>> drivers/crypto/marvell/cesa.h:631:16: sparse: cast to restricted __le32
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:670:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:670:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:670:29:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:631:16: sparse: cast to restricted __le32
>> drivers/crypto/marvell/cesa.h:625:25: sparse: invalid assignment: &=
   drivers/crypto/marvell/cesa.h:625:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:625:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:626:25: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:626:25:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:626:25:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:670:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:670:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:670:29:    right side has type restricted __le32
   drivers/crypto/marvell/hash.c:616:51: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/hash.c:616:51:    expected unsigned int [unsigned] [usertype] flags
   drivers/crypto/marvell/hash.c:616:51:    got restricted gfp_t [usertype] flags
   drivers/crypto/marvell/hash.c:677:57: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/hash.c:677:57:    expected unsigned int [unsigned] [usertype] flags
   drivers/crypto/marvell/hash.c:677:57:    got restricted gfp_t [usertype] flags
   drivers/crypto/marvell/cesa.h:663:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:663:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:663:28:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:663:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:663:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:663:28:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/hash.c:1258:30: sparse: cast to restricted __be32
>> drivers/crypto/marvell/hash.c:1258:30: sparse: cast to restricted __be32
>> drivers/crypto/marvell/hash.c:1258:30: sparse: cast to restricted __be32
>> drivers/crypto/marvell/hash.c:1258:30: sparse: cast to restricted __be32
>> drivers/crypto/marvell/hash.c:1258:30: sparse: cast to restricted __be32
>> drivers/crypto/marvell/hash.c:1258:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1261:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1261:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1261:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1261:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1261:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1261:34: sparse: cast to restricted __be32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/hash.c:1328:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1328:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1328:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1328:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1328:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1328:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1331:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1331:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1331:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1331:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1331:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1331:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1385:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1385:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1385:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1385:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1385:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1385:30: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1388:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1388:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1388:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1388:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1388:34: sparse: cast to restricted __be32
   drivers/crypto/marvell/hash.c:1388:34: sparse: cast to restricted __be32
>> drivers/crypto/marvell/cesa.h:636:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:636:25:    expected unsigned int [unsigned] [usertype] config
   drivers/crypto/marvell/cesa.h:636:25:    got restricted __le32 [usertype] <noident>
--
>> drivers/crypto/marvell/tdma.c:68:39: sparse: cast to restricted __le32
   drivers/crypto/marvell/tdma.c:72:31: sparse: cast to restricted __le32
>> drivers/crypto/marvell/tdma.c:86:35: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/tdma.c:86:35:    expected unsigned int [unsigned] [usertype] dst
   drivers/crypto/marvell/tdma.c:86:35:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/tdma.c:89:35: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/tdma.c:89:35:    expected unsigned int [unsigned] [usertype] src
   drivers/crypto/marvell/tdma.c:89:35:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:644:24: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:644:24:    expected unsigned int [unsigned] [usertype] enc_p
   drivers/crypto/marvell/cesa.h:644:24:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:645:28: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:645:28:    expected unsigned int [unsigned] [usertype] enc_key_p
   drivers/crypto/marvell/cesa.h:645:28:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/cesa.h:646:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:646:25:    expected unsigned int [unsigned] [usertype] enc_iv
   drivers/crypto/marvell/cesa.h:646:25:    got restricted __le32 [usertype] <noident>
   drivers/crypto/marvell/cesa.h:648:28: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:648:28:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:648:28:    right side has type restricted __le32
   drivers/crypto/marvell/cesa.h:650:29: sparse: invalid assignment: |=
   drivers/crypto/marvell/cesa.h:650:29:    left side has type unsigned int
   drivers/crypto/marvell/cesa.h:650:29:    right side has type restricted __le32
>> drivers/crypto/marvell/cesa.h:651:25: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/cesa.h:651:25:    expected unsigned int [unsigned] [usertype] mac_iv
   drivers/crypto/marvell/cesa.h:651:25:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/tdma.c:108:27: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/tdma.c:108:27:    expected unsigned int [unsigned] [usertype] cur_dma
   drivers/crypto/marvell/tdma.c:108:27:    got restricted __le32 [usertype] <noident>
>> drivers/crypto/marvell/tdma.c:174:44: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/tdma.c:174:44:    expected restricted gfp_t [usertype] flags
   drivers/crypto/marvell/tdma.c:174:44:    got unsigned int [unsigned] [usertype] flags
   drivers/crypto/marvell/tdma.c:185:44: sparse: incorrect type in argument 2 (different base types)
   drivers/crypto/marvell/tdma.c:185:44:    expected restricted gfp_t [usertype] flags
   drivers/crypto/marvell/tdma.c:185:44:    got unsigned int [unsigned] [usertype] flags

vim +385 drivers/crypto/s5p-sss.c

a49e490c Vladimir Zapolskiy       2011-04-08  379  static void s5p_set_aes(struct s5p_aes_dev *dev,
a49e490c Vladimir Zapolskiy       2011-04-08  380  			uint8_t *key, uint8_t *iv, unsigned int keylen)
a49e490c Vladimir Zapolskiy       2011-04-08  381  {
a49e490c Vladimir Zapolskiy       2011-04-08  382  	void __iomem *keystart;
a49e490c Vladimir Zapolskiy       2011-04-08  383  
8f9702aa Naveen Krishna Chatradhi 2014-05-08  384  	if (iv)
89245107 Naveen Krishna Chatradhi 2014-05-08 @385  		memcpy(dev->aes_ioaddr + SSS_REG_AES_IV_DATA(0), iv, 0x10);
a49e490c Vladimir Zapolskiy       2011-04-08  386  
a49e490c Vladimir Zapolskiy       2011-04-08  387  	if (keylen == AES_KEYSIZE_256)
89245107 Naveen Krishna Chatradhi 2014-05-08  388  		keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(0);
a49e490c Vladimir Zapolskiy       2011-04-08  389  	else if (keylen == AES_KEYSIZE_192)
89245107 Naveen Krishna Chatradhi 2014-05-08  390  		keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(2);
a49e490c Vladimir Zapolskiy       2011-04-08  391  	else
89245107 Naveen Krishna Chatradhi 2014-05-08  392  		keystart = dev->aes_ioaddr + SSS_REG_AES_KEY_DATA(4);
a49e490c Vladimir Zapolskiy       2011-04-08  393  
a49e490c Vladimir Zapolskiy       2011-04-08 @394  	memcpy(keystart, key, keylen);
a49e490c Vladimir Zapolskiy       2011-04-08  395  }
a49e490c Vladimir Zapolskiy       2011-04-08  396  
a49e490c Vladimir Zapolskiy       2011-04-08  397  static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)

:::::: The code at line 385 was first introduced by commit
:::::: 892451071de77a088a6227e36d3a2732d51c5b84 crypto: s5p-sss - Add support for SSS module on Exynos

:::::: TO: Naveen Krishna Chatradhi <ch.naveen@samsung.com>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Herbert Xu Oct. 14, 2015, 2:08 p.m. UTC | #2
On Wed, Oct 14, 2015 at 05:03:30AM +0800, kbuild test robot wrote:
> Hi Javier,
> 
> [auto build test WARNING on cryptodev/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

Javier, please make sure these warnings are fixed before you enable
COMPILE_TEST.

Thanks,
Javier Martinez Canillas Oct. 14, 2015, 2:17 p.m. UTC | #3
Hello Herbert,

On 10/14/2015 04:08 PM, Herbert Xu wrote:
> On Wed, Oct 14, 2015 at 05:03:30AM +0800, kbuild test robot wrote:
>> Hi Javier,
>>
>> [auto build test WARNING on cryptodev/master -- if it's inappropriate base, please suggest rules for selecting the more suitable base]
> 
> Javier, please make sure these warnings are fixed before you enable
> COMPILE_TEST.
>

Yes, I will. I built tested on arm32 and x86 before posting the patch
but forgot about sparse.

Getting more build coverage for the drivers will likely lead to new
build warnings like the one reported by Fengguang so I wonder if should
just desist in enabling COMPILE_TEST for drivers since I would not be
able to test in every possible setup.

On the other hand, I guess the fact that there are issues found, shows
the usefulness of COMPILE_TEST.

> Thanks,
> 

Best regards,
diff mbox

Patch

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index ab7e3b668890..dba87ab8878f 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -51,7 +51,7 @@  config CRYPTO_DEV_PADLOCK_SHA
 
 config CRYPTO_DEV_GEODE
 	tristate "Support for the Geode LX AES engine"
-	depends on X86_32 && PCI
+	depends on (X86_32 || COMPILE_TEST) && PCI
 	select CRYPTO_ALGAPI
 	select CRYPTO_BLKCIPHER
 	help
@@ -175,7 +175,7 @@  config CRYPTO_DEV_MV_CESA
 
 config CRYPTO_DEV_MARVELL_CESA
 	tristate "New Marvell's Cryptographic Engine driver"
-	depends on PLAT_ORION || ARCH_MVEBU
+	depends on PLAT_ORION || ARCH_MVEBU || COMPILE_TEST
 	select CRYPTO_AES
 	select CRYPTO_DES
 	select CRYPTO_BLKCIPHER
@@ -310,7 +310,7 @@  config CRYPTO_DEV_OMAP_DES
 
 config CRYPTO_DEV_PICOXCELL
 	tristate "Support for picoXcell IPSEC and Layer2 crypto engines"
-	depends on ARCH_PICOXCELL && HAVE_CLK
+	depends on (ARCH_PICOXCELL || COMPILE_TEST) && HAVE_CLK
 	select CRYPTO_AEAD
 	select CRYPTO_AES
 	select CRYPTO_AUTHENC
@@ -338,7 +338,7 @@  config CRYPTO_DEV_SAHARA
 
 config CRYPTO_DEV_S5P
 	tristate "Support for Samsung S5PV210/Exynos crypto accelerator"
-	depends on ARCH_S5PV210 || ARCH_EXYNOS
+	depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
 	select CRYPTO_AES
 	select CRYPTO_BLKCIPHER
 	help
@@ -429,7 +429,7 @@  endif
 
 config CRYPTO_DEV_MXS_DCP
 	tristate "Support for Freescale MXS DCP"
-	depends on (ARCH_MXS || ARCH_MXC)
+	depends on (ARCH_MXS || ARCH_MXC || COMPILE_TEST)
 	select CRYPTO_CBC
 	select CRYPTO_ECB
 	select CRYPTO_AES