crypto: caam - fix sparse warnings
Pick commit 8439e94 from Linux
upstream.

    crypto: caam - fix sparse warnings

    Fix the following sparse warning (note that endianness issues
    are not not addressed in current patch):

    drivers/crypto/caam/ctrl.c:388:24: warning: incorrect type in argument 1 (different address spaces)
    drivers/crypto/caam/ctrl.c:388:24:    expected void [noderef] <asn:2>*reg
    drivers/crypto/caam/ctrl.c:388:24:    got unsigned int *<noident>
    drivers/crypto/caam/ctrl.c:390:24: warning: incorrect type in argument 1 (different address spaces)
    drivers/crypto/caam/ctrl.c:390:24:    expected void [noderef] <asn:2>*reg
    drivers/crypto/caam/ctrl.c:390:24:    got unsigned int *<noident>
    drivers/crypto/caam/ctrl.c:548:24: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:548:24:    expected struct caam_ctrl [noderef] <asn:2>*ctrl
    drivers/crypto/caam/ctrl.c:548:24:    got struct caam_ctrl *<noident>
    drivers/crypto/caam/ctrl.c:550:30: warning: cast removes address space of expression
    drivers/crypto/caam/ctrl.c:549:26: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:549:26:    expected struct caam_assurance [noderef] <asn:2>*assure
    drivers/crypto/caam/ctrl.c:549:26:    got struct caam_assurance *<noident>
    drivers/crypto/caam/ctrl.c:554:28: warning: cast removes address space of expression
    drivers/crypto/caam/ctrl.c:553:24: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:553:24:    expected struct caam_deco [noderef] <asn:2>*deco
    drivers/crypto/caam/ctrl.c:553:24:    got struct caam_deco *<noident>
    drivers/crypto/caam/ctrl.c:634:48: warning: cast removes address space of expression
    drivers/crypto/caam/ctrl.c:633:44: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:633:44:    expected struct caam_job_ring [noderef] <asn:2>*<noident>
    drivers/crypto/caam/ctrl.c:633:44:    got struct caam_job_ring *<noident>
    drivers/crypto/caam/ctrl.c:648:34: warning: cast removes address space of expression
    drivers/crypto/caam/ctrl.c:647:30: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:647:30:    expected struct caam_queue_if [noderef] <asn:2>*qi
    drivers/crypto/caam/ctrl.c:647:30:    got struct caam_queue_if *<noident>
    drivers/crypto/caam/ctrl.c:806:37: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:806:37:    expected void *data
    drivers/crypto/caam/ctrl.c:806:37:    got unsigned int [noderef] <asn:2>*
    drivers/crypto/caam/ctrl.c:814:38: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:814:38:    expected void *data
    drivers/crypto/caam/ctrl.c:814:38:    got unsigned int [noderef] <asn:2>*
    drivers/crypto/caam/ctrl.c:822:38: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/ctrl.c:822:38:    expected void *data
    drivers/crypto/caam/ctrl.c:822:38:    got unsigned int [noderef] <asn:2>*
    drivers/crypto/caam/jr.c:492:23: warning: incorrect type in assignment (different address spaces)
    drivers/crypto/caam/jr.c:492:23:    expected struct caam_job_ring [noderef] <asn:2>*rregs
    drivers/crypto/caam/jr.c:492:23:    got struct caam_job_ring *<noident>
    drivers/crypto/caam/caampkc.c:398:35: warning: Using plain integer as NULL pointer
    drivers/crypto/caam/caampkc.c:444:35: warning: Using plain integer as NULL pointer

    Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 4f50258 commit 05f705aad75ab3efb6f41c097b15fafccbfeae0c
@Marcin Niestroj Marcin Niestroj authored on 3 Sep 2018
Sascha Hauer committed on 4 Sep 2018
Showing 2 changed files
View
drivers/crypto/caam/ctrl.c
View
drivers/crypto/caam/jr.c