[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1400217899-32261-2-git-send-email-octavian.purdila@intel.com>
Date: Fri, 16 May 2014 08:24:59 +0300
From: Octavian Purdila <octavian.purdila@...el.com>
To: greg@...ah.com
Cc: linux-kernel@...r.kernel.org, fengguang.wu@...el.com,
Octavian Purdila <octavian.purdila@...el.com>,
Jun Tian <jun.j.tian@...el.com>,
Alan Cox <alan@...ux.intel.com>
Subject: [PATCH staging-next] goldfish: pipe: fix warnings for 32bit builds
drivers/platform/goldfish/goldfish_pipe.c: In function 'goldfish_cmd_status':
drivers/platform/goldfish/goldfish_pipe.c:164:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
writel((u32)(u64)pipe, dev->base + PIPE_REG_CHANNEL);
^
drivers/platform/goldfish/goldfish_pipe.c: In function 'goldfish_cmd':
drivers/platform/goldfish/goldfish_pipe.c:180:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
writel((u32)(u64)pipe, dev->base + PIPE_REG_CHANNEL);
^
drivers/platform/goldfish/goldfish_pipe.c: In function 'goldfish_pipe_read_write':
drivers/platform/goldfish/goldfish_pipe.c:337:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
writel((u32)(u64)pipe, dev->base + PIPE_REG_CHANNEL);
Reported-by: Fengguang Wu <fengguang.wu@...el.com>
Cc: Jun Tian <jun.j.tian@...el.com>
Cc: Alan Cox <alan@...ux.intel.com>
Signed-off-by: Octavian Purdila <octavian.purdila@...el.com>
---
drivers/platform/goldfish/goldfish_pipe.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index c86180b..d9a09d9 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -158,7 +158,7 @@ static u32 goldfish_cmd_status(struct goldfish_pipe *pipe, u32 cmd)
struct goldfish_pipe_dev *dev = pipe->dev;
spin_lock_irqsave(&dev->lock, flags);
- gf_write64((u64)pipe, dev->base + PIPE_REG_CHANNEL,
+ gf_write64((u64)(unsigned long)pipe, dev->base + PIPE_REG_CHANNEL,
dev->base + PIPE_REG_CHANNEL_HIGH);
writel(cmd, dev->base + PIPE_REG_COMMAND);
status = readl(dev->base + PIPE_REG_STATUS);
@@ -172,7 +172,7 @@ static void goldfish_cmd(struct goldfish_pipe *pipe, u32 cmd)
struct goldfish_pipe_dev *dev = pipe->dev;
spin_lock_irqsave(&dev->lock, flags);
- gf_write64((u64)pipe, dev->base + PIPE_REG_CHANNEL,
+ gf_write64((u64)(unsigned long)pipe, dev->base + PIPE_REG_CHANNEL,
dev->base + PIPE_REG_CHANNEL_HIGH);
writel(cmd, dev->base + PIPE_REG_COMMAND);
spin_unlock_irqrestore(&dev->lock, flags);
@@ -327,8 +327,9 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer,
spin_lock_irqsave(&dev->lock, irq_flags);
if (access_with_param(dev, CMD_WRITE_BUFFER + cmd_offset,
address, avail, pipe, &status)) {
- gf_write64((u64)pipe, dev->base + PIPE_REG_CHANNEL,
- dev->base + PIPE_REG_CHANNEL_HIGH);
+ gf_write64((u64)(unsigned long)pipe,
+ dev->base + PIPE_REG_CHANNEL,
+ dev->base + PIPE_REG_CHANNEL_HIGH);
writel(avail, dev->base + PIPE_REG_SIZE);
gf_write64(address, dev->base + PIPE_REG_ADDRESS,
dev->base + PIPE_REG_ADDRESS_HIGH);
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists