From 94bcd6b0ac110dfc4bac6ba355bcbab138360c32 Mon Sep 17 00:00:00 2001 From: Vasili Galka Date: Tue, 26 Aug 2014 13:44:22 +0300 Subject: [PATCH 1/2] arc: Fix printf size_t format related warnings (again...) The basic idea: Define size_t using the __SIZE_TYPE__ compiler-defined type. For detailed explanation see similar patch for the nios2 arch: http://patchwork.ozlabs.org/patch/379938/ Signed-off-by: Vasili Galka Cc: Alexey Brodkin --- arch/arc/include/asm/posix_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arc/include/asm/posix_types.h b/arch/arc/include/asm/posix_types.h index 20415f0..51347a4 100644 --- a/arch/arc/include/asm/posix_types.h +++ b/arch/arc/include/asm/posix_types.h @@ -16,7 +16,11 @@ typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; +#ifdef __GNUC__ +typedef __SIZE_TYPE__ __kernel_size_t; +#else typedef unsigned int __kernel_size_t; +#endif typedef int __kernel_ssize_t; typedef int __kernel_ptrdiff_t; typedef long __kernel_time_t; From 2fea4f5addb40d7551ed754175acbec7f2750005 Mon Sep 17 00:00:00 2001 From: Vasili Galka Date: Tue, 26 Aug 2014 17:50:29 +0300 Subject: [PATCH 2/2] axs101: Fix type mismatch warning Initialization of pointer from integer shall be designated by explicit type cast. Signed-off-by: Vasili Galka Cc: Alexey Brodkin --- board/synopsys/axs101/nand.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs101/nand.c index c7f90c4..ff35286 100644 --- a/board/synopsys/axs101/nand.c +++ b/board/synopsys/axs101/nand.c @@ -62,8 +62,10 @@ struct nand_bd { uint32_t buffer_ptr1; /* DES3 */ }; -#define NAND_REG_WRITE(r, v) writel(v, CONFIG_SYS_NAND_BASE + r) -#define NAND_REG_READ(r) readl(CONFIG_SYS_NAND_BASE + r) +#define NAND_REG_WRITE(r, v) \ + writel(v, (volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) +#define NAND_REG_READ(r) \ + readl((const volatile void __iomem *)(CONFIG_SYS_NAND_BASE + r)) static struct nand_bd *bd; /* DMA buffer descriptors */