From patchwork Thu Oct 25 14:59:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 1644781 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork1.kernel.org (Postfix) with ESMTP id 50BD03FC36 for ; Thu, 25 Oct 2012 15:01:50 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id q9PExoEp019627; Thu, 25 Oct 2012 09:59:51 -0500 Received: from DLEE74.ent.ti.com (dlee74.ent.ti.com [157.170.170.8]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9PExoA6028564; Thu, 25 Oct 2012 09:59:50 -0500 Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Thu, 25 Oct 2012 09:59:50 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q9PExoNr002320; Thu, 25 Oct 2012 09:59:50 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 2EA2C80627; Thu, 25 Oct 2012 09:59:50 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 8300D80626 for ; Thu, 25 Oct 2012 09:59:48 -0500 (CDT) Received: from neches.ext.ti.com (neches.ext.ti.com [192.91.81.29]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id q9PExm3b022470 for ; Thu, 25 Oct 2012 09:59:48 -0500 (CDT) Received: from psmtp.com (na3sys009amx207.postini.com [74.125.149.47]) by neches.ext.ti.com (8.13.7/8.13.7) with SMTP id q9PExkbt006378 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 25 Oct 2012 09:59:47 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]) (using TLSv1) by na3sys009amx207.postini.com ([74.125.148.10]) with SMTP; Thu, 25 Oct 2012 07:59:47 PDT Received: by mail-pa0-f45.google.com with SMTP id fb10so1164826pad.4 for ; Thu, 25 Oct 2012 07:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=PZBjQX8kMbKR46eNlJadyWHM7OaBrkDilEeKS7xvJSc=; b=A68wxOqV1X6tK3y8+E8G03pkaRjPO1MNyMxXX0B+Zo0//smkXY+vomWmT+3WusDAQ0 y99TsZBn2+tHVeea86tqY+DlHz3EfNwm5jGNp0habQnG28BeeDcdbSOOb6/taVxE4Kwj oSKNcw5sgbOwD3ibKYgNbNgBJ6LE9jFWBiHPW3hQ8k/kJfAIqb8AmAIMEmQaZRREknVV /17yVluSjMINXocoSC5/f6TlajHEjXwTMgFYJG5VJSSHkZjUGPLVaqoPKf5sXopGIsOq ky8ZBgCT8ATD4MI+y5MYTR6if79V0iA3eUvVFTSYdRiLbPdw5XYzdk1VkDwg/3+nSN/J awOQ== Received: by 10.68.252.133 with SMTP id zs5mr60267942pbc.152.1351177186412; Thu, 25 Oct 2012 07:59:46 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id k4sm11415307pax.7.2012.10.25.07.59.43 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Oct 2012 07:59:45 -0700 (PDT) From: Prabhakar Lad To: LMML , DLOS Subject: [PATCH v3] media: davinci: vpbe: fix build warning Date: Thu, 25 Oct 2012 20:29:02 +0530 Message-ID: <1351177142-2314-1-git-send-email-prabhakar.lad@ti.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-pstn-levels: (S:51.50422/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-dkim: 1 skipped:not-enabled X-pstn-settings: 2 (0.5000:0.0050) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [82/3] CC: LKML X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Lad, Prabhakar Warnings were generated because of the following commit changed data type for address pointer 195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors add __iomem annotation to fix following warnings drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’: drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default] arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile void *’ but argument is of type ‘long unsigned int’ This patch stores the ioremap_nocache() returned address in a void __iomem * instead of a unsigned long and passes the same to readl/writel functions which fixes the above warnings. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Acked-by: Laurent Pinchart --- Changes for v3: 1: Elaborated the commit message as pointed by Laurent. Changes for v2: 1: Made the base addr to void __iomem * instead of long unsigned, as pointed by Laurent. drivers/media/platform/davinci/vpbe_osd.c | 9 ++++----- include/media/davinci/vpbe_osd.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index bba299d..707f243 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -62,7 +62,7 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) { struct osd_state *osd = sd; - u32 addr = osd->osd_base + offset; + void __iomem *addr = osd->osd_base + offset; u32 val = readl(addr) | mask; writel(val, addr); @@ -74,7 +74,7 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) { struct osd_state *osd = sd; - u32 addr = osd->osd_base + offset; + void __iomem *addr = osd->osd_base + offset; u32 val = readl(addr) & ~mask; writel(val, addr); @@ -87,7 +87,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, { struct osd_state *osd = sd; - u32 addr = osd->osd_base + offset; + void __iomem *addr = osd->osd_base + offset; u32 new_val = (readl(addr) & ~mask) | (val & mask); writel(new_val, addr); @@ -1559,8 +1559,7 @@ static int osd_probe(struct platform_device *pdev) ret = -ENODEV; goto free_mem; } - osd->osd_base = (unsigned long)ioremap_nocache(res->start, - osd->osd_size); + osd->osd_base = ioremap_nocache(res->start, osd->osd_size); if (!osd->osd_base) { dev_err(osd->dev, "Unable to map the OSD region\n"); ret = -ENODEV; diff --git a/include/media/davinci/vpbe_osd.h b/include/media/davinci/vpbe_osd.h index d7e397a..5ab0d8d 100644 --- a/include/media/davinci/vpbe_osd.h +++ b/include/media/davinci/vpbe_osd.h @@ -357,7 +357,7 @@ struct osd_state { spinlock_t lock; struct device *dev; dma_addr_t osd_base_phys; - unsigned long osd_base; + void __iomem *osd_base; unsigned long osd_size; /* 1-->the isr will toggle the VID0 ping-pong buffer */ int pingpong;