diff options
author | Luo Ji <ji.luo@nxp.com> | 2018-07-19 18:06:24 +0800 |
---|---|---|
committer | Luo Ji <ji.luo@nxp.com> | 2018-07-19 18:15:34 +0800 |
commit | 4397a056bff3dac809a9d013eeb5669b2cac2d26 (patch) | |
tree | cde2e8caf33ad10ef343c8d716b49173cf8e58a6 /lib | |
parent | 1cf8780e46c0422121c44e9c8832432d62771ac5 (diff) |
MA-12216 [Android] Fix u-boot build errors
Type mismatch will cause some build warnings and they will be treated
as errors when '-Werror' is specified. Fix the error logs loke below:
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
Test: build pass for evk_imx8mm
Change-Id: I48489815c8310c659a5c7c860433c4a93cb0dc66
Signed-off-by: Luo Ji <ji.luo@nxp.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/avb/fsl/fsl_avbkey.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/avb/fsl/fsl_avbkey.c b/lib/avb/fsl/fsl_avbkey.c index 06b52f09b7..f365bf8222 100644 --- a/lib/avb/fsl/fsl_avbkey.c +++ b/lib/avb/fsl/fsl_avbkey.c @@ -431,7 +431,7 @@ static int gen_rpmb_key(struct keyslot_package *kp) { #endif /* generate keyblob and program to fuse */ - if (caam_gen_blob((uint32_t)plain_key, (uint32_t)(kp->rpmb_keyblob), RPMBKEY_LENGTH)) { + if (caam_gen_blob((uint32_t)(ulong)plain_key, (uint32_t)(kp->rpmb_keyblob), RPMBKEY_LENGTH)) { ERR("gen rpmb key blb error\n"); ret = -1; goto fail; @@ -516,7 +516,7 @@ static int rpmb_key(struct mmc *mmc) { } /* generate keyblob and program to fuse */ - if (caam_gen_blob((uint32_t)plain_key, (uint32_t)blob, RPMBKEY_LENGTH)) { + if (caam_gen_blob((uint32_t)(ulong)plain_key, (uint32_t)(ulong)blob, RPMBKEY_LENGTH)) { ERR("gen rpmb key blb error\n"); ret = -1; goto fail; @@ -629,7 +629,7 @@ static int rpmb_read(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_t memcpy(blob, kp.rpmb_keyblob, RPMBKEY_BLOB_LEN); #endif caam_open(); - if (caam_decap_blob((uint32_t)extract_key, (uint32_t)blob, RPMBKEY_LENGTH)) { + if (caam_decap_blob((uint32_t)(ulong)extract_key, (uint32_t)(ulong)blob, RPMBKEY_LENGTH)) { ERR("decap rpmb key error\n"); ret = -1; goto fail; @@ -735,7 +735,7 @@ static int rpmb_write(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_ memcpy(blob, kp.rpmb_keyblob, RPMBKEY_BLOB_LEN); #endif caam_open(); - if (caam_decap_blob((uint32_t)extract_key, (uint32_t)blob, RPMBKEY_LENGTH)) { + if (caam_decap_blob((uint32_t)(ulong)extract_key, (uint32_t)(ulong)blob, RPMBKEY_LENGTH)) { ERR("decap rpmb key error\n"); ret = -1; goto fail; @@ -753,7 +753,7 @@ static int rpmb_write(struct mmc *mmc, uint8_t *buffer, size_t num_bytes, int64_ cnt = num_bytes - num_write; if (!s || cnt != blksz) { /* read blk first */ if (mmc_rpmb_read(mmc, bdata, bs, 1, extract_key) != 1) { - ERR("mmc_rpmb_read err, mmc= 0x%08x\n", (unsigned int)mmc); + ERR("mmc_rpmb_read err, mmc= 0x%08x\n", (uint32_t)(ulong)mmc); ret = -1; goto fail; } |