Commit 79e90af14af32e86fd7efd3c84e09a0bd572ab5b

Authored by Aymen Sghaier
Committed by Ye Li
1 parent b0f889b77b

MLK-18044-2: crypto: caam: Fix build warnings pointer casting

Enabling CAAM driver for i.MX8M platforms, a 64 bits architecture,
 lead to casting warnings: from/to pointer to/from integer with
 different size. This patch fix these warnings

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit d02fbc7d2957f4788ced017ccf17fd35ab968121)

Showing 2 changed files with 5 additions and 4 deletions Side-by-side Diff

drivers/crypto/fsl/jr.c
1 1 /*
2 2 * Copyright 2008-2014 Freescale Semiconductor, Inc.
  3 + * Copyright 2018 NXP
3 4 *
4 5 * SPDX-License-Identifier: GPL-2.0+
5 6 *
6 7  
... ... @@ -28,10 +29,10 @@
28 29 };
29 30  
30 31 #define SEC_ADDR(idx) \
31   - ((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx]))
  32 + (ulong)((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx]))
32 33  
33 34 #define SEC_JR0_ADDR(idx) \
34   - (SEC_ADDR(idx) + \
  35 + (ulong)(SEC_ADDR(idx) + \
35 36 (CONFIG_SYS_FSL_JR0_OFFSET - CONFIG_SYS_FSL_SEC_OFFSET))
36 37  
37 38 struct jobring jr0[CONFIG_SYS_FSL_MAX_NUM_OF_SEC];
... ... @@ -14,8 +14,8 @@
14 14 #include <asm/io.h>
15 15  
16 16 #ifdef CONFIG_SYS_FSL_SEC_LE
17   -#define sec_in32(a) in_le32(a)
18   -#define sec_out32(a, v) out_le32(a, v)
  17 +#define sec_in32(a) in_le32((ulong *)(ulong)a)
  18 +#define sec_out32(a, v) out_le32((ulong *)(ulong)a, v)
19 19 #define sec_in16(a) in_le16(a)
20 20 #define sec_clrbits32 clrbits_le32
21 21 #define sec_setbits32 setbits_le32