All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compiler warnings in smartreflex.c
@ 2008-10-10 13:51 Sanjeev Premi
  2008-10-17 22:31 ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Sanjeev Premi @ 2008-10-10 13:51 UTC (permalink / raw)
  To: linux-omap; +Cc: Sanjeev Premi

Fix these compiler warnings:
smartreflex.c:126: warning: initialization makes integer from pointer without a cast
smartreflex.c:134: warning: initialization makes integer from pointer without a cast

Refreshed after updates from Felipe.

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 arch/arm/mach-omap2/smartreflex.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index e54c0fb..33f604d 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -49,8 +49,8 @@ struct omap_sr {
 	u32 		opp1_nvalue, opp2_nvalue, opp3_nvalue, opp4_nvalue;
 	u32		opp5_nvalue;
 	u32		senp_mod, senn_mod;
-	u32		srbase_addr;
-	u32		vpbase_addr;
+	void __iomem	*srbase_addr;
+	void __iomem	*vpbase_addr;
 };
 
 /* Custom clocks to enable SR specific enable/disable functions. */
@@ -60,15 +60,15 @@ struct sr_custom_clk {
 	struct omap_sr 	*sr;
 };
 
-#define SR_REGADDR(offs)     (__force void __iomem *)(sr->srbase_addr + offset)
+#define SR_REGADDR(offs)	(sr->srbase_addr + offset)
 
-static inline void sr_write_reg(struct omap_sr *sr, int offset, u32 value)
+static inline void sr_write_reg(struct omap_sr *sr, unsigned offset, u32 value)
 {
 	__raw_writel(value, SR_REGADDR(offset));
 }
 
-static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
-								u32 value)
+static inline void sr_modify_reg(struct omap_sr *sr, unsigned offset, u32 mask,
+					u32 value)
 {
 	u32 reg_val;
 
@@ -79,7 +79,7 @@ static inline void sr_modify_reg(struct omap_sr *sr, int offset, u32 mask,
 	__raw_writel(reg_val, SR_REGADDR(offset));
 }
 
-static inline u32 sr_read_reg(struct omap_sr *sr, int offset)
+static inline u32 sr_read_reg(struct omap_sr *sr, unsigned offset)
 {
 	return __raw_readl(SR_REGADDR(offset));
 }
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH] Fix compiler warnings in smartreflex.c
@ 2008-10-10 12:37 Sanjeev Premi
  2008-10-10 12:44 ` Felipe Balbi
  0 siblings, 1 reply; 7+ messages in thread
From: Sanjeev Premi @ 2008-10-10 12:37 UTC (permalink / raw)
  To: linux-omap; +Cc: Sanjeev Premi

Fix these compiler warnings:
smartreflex.c:126: warning: initialization makes integer from pointer without a cast
smartreflex.c:134: warning: initialization makes integer from pointer without a cast

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 arch/arm/mach-omap2/smartreflex.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index e54c0fb..8460633 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -123,7 +123,7 @@ static struct omap_sr sr1 = {
 	.is_sr_reset		= 1,
 	.is_autocomp_active	= 0,
 	.clk_length		= 0,
-	.srbase_addr		= OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
+	.srbase_addr		= (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR1_BASE),
 };
 
 static struct omap_sr sr2 = {
@@ -131,7 +131,7 @@ static struct omap_sr sr2 = {
 	.is_sr_reset		= 1,
 	.is_autocomp_active	= 0,
 	.clk_length		= 0,
-	.srbase_addr		= OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
+	.srbase_addr		= (u32)OMAP2_IO_ADDRESS(OMAP34XX_SR2_BASE),
 };
 
 static struct sr_custom_clk sr1_custom_clk = {
-- 
1.5.6


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-17 22:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 13:51 [PATCH] Fix compiler warnings in smartreflex.c Sanjeev Premi
2008-10-17 22:31 ` Tony Lindgren
  -- strict thread matches above, loose matches on Subject: below --
2008-10-10 12:37 Sanjeev Premi
2008-10-10 12:44 ` Felipe Balbi
2008-10-10 12:54   ` Felipe Balbi
2008-10-10 13:09     ` Premi, Sanjeev
2008-10-10 13:19       ` Felipe Balbi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.