Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751431AbbDLJcP (ORCPT ); Sun, 12 Apr 2015 05:32:15 -0400 Received: from mail-wg0-f52.google.com ([74.125.82.52]:33744 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902AbbDLJcN (ORCPT ); Sun, 12 Apr 2015 05:32:13 -0400 From: Peter Senna Tschudin To: Greg Kroah-Hartman , Loic Pefferkorn , Alan , Jun Tian , Octavian Purdila , Garret Kelly , , Nick Kralevich , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Cc: Peter Senna Tschudin Subject: [PATCH v2] Fix pointer cast for 32 bits arch Date: Sun, 12 Apr 2015 11:31:55 +0200 Message-Id: <1428831115-31122-1-git-send-email-peter.senna@gmail.com> X-Mailer: git-send-email 2.1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1865 Lines: 53 Sparse compalins about casting void * to u64 on i386. Change the cast to resource_size_t. Also update the gf_write64 function definition changing the first argument type from unsigned long data to resource_size_t. Signed-off-by: Peter Senna Tschudin --- Changes from V1: - Updated commit message. Tested by compilation only. Tested for x86 and x86_64. drivers/staging/goldfish/goldfish_nand.c | 3 ++- include/linux/goldfish.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index d68f216..738fdc4 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -87,7 +87,8 @@ static u32 goldfish_nand_cmd(struct mtd_info *mtd, enum nand_cmd cmd, writel((u32)(addr >> 32), base + NAND_ADDR_HIGH); writel((u32)addr, base + NAND_ADDR_LOW); writel(len, base + NAND_TRANSFER_SIZE); - gf_write64((u64)ptr, base + NAND_DATA, base + NAND_DATA_HIGH); + gf_write64((resource_size_t)ptr, base + NAND_DATA, + base + NAND_DATA_HIGH); writel(cmd, base + NAND_COMMAND); rv = readl(base + NAND_RESULT); } diff --git a/include/linux/goldfish.h b/include/linux/goldfish.h index 569236e..494e943 100644 --- a/include/linux/goldfish.h +++ b/include/linux/goldfish.h @@ -3,7 +3,7 @@ /* Helpers for Goldfish virtual platform */ -static inline void gf_write64(unsigned long data, +static inline void gf_write64(resource_size_t data, void __iomem *portl, void __iomem *porth) { writel((u32)data, portl); -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/