mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-03 02:16:09 +02:00
MLK-17992: caam: sm: Fix compilation warnings
Fix the following warnings in CAAM SM: drivers/crypto/caam/sm_store.c: In function 'blacken_key_jobdesc': drivers/crypto/caam/sm_store.c:141:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] tmpdesc[idx++] = (u32)key; ^ drivers/crypto/caam/sm_store.c:153:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] tmpdesc[idx++] = (u32)key; ^ drivers/crypto/caam/sm_store.c: In function 'blob_encap_jobdesc': drivers/crypto/caam/sm_store.c:274:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] tmpdesc[idx++] = (u32)secretbuf; ^ drivers/crypto/caam/sm_store.c: In function 'blob_decap_jobdesc': drivers/crypto/caam/sm_store.c:390:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] tmpdesc[idx++] = (u32)outbuf; ^ drivers/crypto/caam/sm_store.c: In function 'slot_get_base': drivers/crypto/caam/sm_store.c:569:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (u32)(ksdata->base_address); ^ drivers/crypto/caam/sm_store.c: In function 'sm_keystore_slot_load': drivers/crypto/caam/sm_store.c:789:6: warning: unused variable 'i' [-Wunused-variable] u32 i; Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com> Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
This commit is contained in:
parent
fcdaabf1bb
commit
61f57509bc
|
@ -140,7 +140,7 @@ static int blacken_key_jobdesc(u32 **desc, void *key, u16 keysz, bool auth)
|
|||
|
||||
/* Load key to class 1 key register */
|
||||
tmpdesc[idx++] = CMD_KEY | CLASS_1 | (keysz & KEY_LENGTH_MASK);
|
||||
tmpdesc[idx++] = (u32)key;
|
||||
tmpdesc[idx++] = (uintptr_t)key;
|
||||
|
||||
/* ...and write back out via FIFO store*/
|
||||
tmpdesc[idx] = CMD_FIFO_STORE | CLASS_1 | (keysz & KEY_LENGTH_MASK);
|
||||
|
@ -152,7 +152,7 @@ static int blacken_key_jobdesc(u32 **desc, void *key, u16 keysz, bool auth)
|
|||
tmpdesc[idx] |= FIFOST_TYPE_KEY_CCM_JKEK;
|
||||
|
||||
idx++;
|
||||
tmpdesc[idx++] = (u32)key;
|
||||
tmpdesc[idx++] = (uintptr_t)key;
|
||||
|
||||
/* finish off the job header */
|
||||
tmpdesc[0] = CMD_DESC_HDR | HDR_ONE | (idx & HDR_DESCLEN_MASK);
|
||||
|
@ -273,7 +273,7 @@ static int blob_encap_jobdesc(u32 **desc, dma_addr_t keymod,
|
|||
|
||||
/* Input data, should be somewhere in secure memory */
|
||||
tmpdesc[idx++] = CMD_SEQ_IN_PTR | secretsz;
|
||||
tmpdesc[idx++] = (u32)secretbuf;
|
||||
tmpdesc[idx++] = (uintptr_t)secretbuf;
|
||||
|
||||
/* Set blob encap, then color */
|
||||
tmpdesc[idx] = CMD_OPERATION | OP_TYPE_ENCAP_PROTOCOL | OP_PCLID_BLOB;
|
||||
|
@ -389,7 +389,7 @@ static int blob_decap_jobdesc(u32 **desc, dma_addr_t keymod, dma_addr_t blobbuf,
|
|||
tmpdesc[idx++] = CMD_SEQ_IN_PTR | (secretsz + BLOB_OVERHEAD);
|
||||
tmpdesc[idx++] = (u32)blobbuf;
|
||||
tmpdesc[idx++] = CMD_SEQ_OUT_PTR | secretsz;
|
||||
tmpdesc[idx++] = (u32)outbuf;
|
||||
tmpdesc[idx++] = (uintptr_t)outbuf;
|
||||
|
||||
/* Decapsulate from secure memory partition to black blob */
|
||||
tmpdesc[idx] = CMD_OPERATION | OP_TYPE_DECAP_PROTOCOL | OP_PCLID_BLOB;
|
||||
|
@ -568,7 +568,7 @@ u32 slot_get_base(struct device *dev, u32 unit, u32 slot)
|
|||
slot, (u32)ksdata->base_address);
|
||||
#endif
|
||||
|
||||
return (u32)(ksdata->base_address);
|
||||
return (uintptr_t)(ksdata->base_address);
|
||||
}
|
||||
|
||||
u32 slot_get_offset(struct device *dev, u32 unit, u32 slot)
|
||||
|
|
Loading…
Reference in New Issue
Block a user