* [PATCH RESEND] media: davinci: vpbe: fix build warning
@ 2012-10-22 12:17 Prabhakar Lad
2012-10-22 12:23 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Prabhakar Lad @ 2012-10-22 12:17 UTC (permalink / raw)
To: LMML; +Cc: Manjunath Hadli, LKML, DLOS, Lad, Prabhakar
From: Lad, Prabhakar <prabhakar.lad@ti.com>
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’
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
---
Resending the patch since, it didn't reach the DLOS mailing list.
drivers/media/platform/davinci/vpbe_osd.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c
index bba299d..9ab9280 100644
--- a/drivers/media/platform/davinci/vpbe_osd.c
+++ b/drivers/media/platform/davinci/vpbe_osd.c
@@ -46,14 +46,14 @@ static inline u32 osd_read(struct osd_state *sd, u32 offset)
{
struct osd_state *osd = sd;
- return readl(osd->osd_base + offset);
+ return readl(IOMEM(osd->osd_base + offset));
}
static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset)
{
struct osd_state *osd = sd;
- writel(val, osd->osd_base + offset);
+ writel(val, IOMEM(osd->osd_base + offset));
return val;
}
@@ -63,9 +63,9 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset)
struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset;
- u32 val = readl(addr) | mask;
+ u32 val = readl(IOMEM(addr)) | mask;
- writel(val, addr);
+ writel(val, IOMEM(addr));
return val;
}
@@ -75,9 +75,9 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset)
struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset;
- u32 val = readl(addr) & ~mask;
+ u32 val = readl(IOMEM(addr)) & ~mask;
- writel(val, addr);
+ writel(val, IOMEM(addr));
return val;
}
@@ -88,9 +88,9 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val,
struct osd_state *osd = sd;
u32 addr = osd->osd_base + offset;
- u32 new_val = (readl(addr) & ~mask) | (val & mask);
+ u32 new_val = (readl(IOMEM(addr)) & ~mask) | (val & mask);
- writel(new_val, addr);
+ writel(new_val, IOMEM(addr));
return new_val;
}
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] media: davinci: vpbe: fix build warning
2012-10-22 12:17 [PATCH RESEND] media: davinci: vpbe: fix build warning Prabhakar Lad
@ 2012-10-22 12:23 ` Laurent Pinchart
2012-10-23 10:47 ` Prabhakar Lad
0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2012-10-22 12:23 UTC (permalink / raw)
To: davinci-linux-open-source; +Cc: Prabhakar Lad, LMML, LKML
Hi Prabhakar,
On Monday 22 October 2012 17:47:51 Prabhakar Lad wrote:
> From: Lad, Prabhakar <prabhakar.lad@ti.com>
>
> 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’
>
> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> ---
> Resending the patch since, it didn't reach the DLOS mailing list.
>
> drivers/media/platform/davinci/vpbe_osd.c | 16 ++++++++--------
> 1 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/davinci/vpbe_osd.c
> b/drivers/media/platform/davinci/vpbe_osd.c index bba299d..9ab9280 100644
> --- a/drivers/media/platform/davinci/vpbe_osd.c
> +++ b/drivers/media/platform/davinci/vpbe_osd.c
> @@ -46,14 +46,14 @@ static inline u32 osd_read(struct osd_state *sd, u32
> offset) {
> struct osd_state *osd = sd;
>
> - return readl(osd->osd_base + offset);
> + return readl(IOMEM(osd->osd_base + offset));
A better fix, in my opinion, would be to change the osd->osd_base field to be
a void __iomem * instead of long unsigned int.
> }
>
> static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset)
> {
> struct osd_state *osd = sd;
>
> - writel(val, osd->osd_base + offset);
> + writel(val, IOMEM(osd->osd_base + offset));
>
> return val;
> }
> @@ -63,9 +63,9 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask,
> u32 offset) struct osd_state *osd = sd;
>
> u32 addr = osd->osd_base + offset;
> - u32 val = readl(addr) | mask;
> + u32 val = readl(IOMEM(addr)) | mask;
>
> - writel(val, addr);
> + writel(val, IOMEM(addr));
>
> return val;
> }
> @@ -75,9 +75,9 @@ static inline u32 osd_clear(struct osd_state *sd, u32
> mask, u32 offset) struct osd_state *osd = sd;
>
> u32 addr = osd->osd_base + offset;
> - u32 val = readl(addr) & ~mask;
> + u32 val = readl(IOMEM(addr)) & ~mask;
>
> - writel(val, addr);
> + writel(val, IOMEM(addr));
>
> return val;
> }
> @@ -88,9 +88,9 @@ static inline u32 osd_modify(struct osd_state *sd, u32
> mask, u32 val, struct osd_state *osd = sd;
>
> u32 addr = osd->osd_base + offset;
> - u32 new_val = (readl(addr) & ~mask) | (val & mask);
> + u32 new_val = (readl(IOMEM(addr)) & ~mask) | (val & mask);
>
> - writel(new_val, addr);
> + writel(new_val, IOMEM(addr));
>
> return new_val;
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] media: davinci: vpbe: fix build warning
2012-10-22 12:23 ` Laurent Pinchart
@ 2012-10-23 10:47 ` Prabhakar Lad
0 siblings, 0 replies; 3+ messages in thread
From: Prabhakar Lad @ 2012-10-23 10:47 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: davinci-linux-open-source, LMML, LKML
Hi Laurent,
On Mon, Oct 22, 2012 at 5:53 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Prabhakar,
>
> On Monday 22 October 2012 17:47:51 Prabhakar Lad wrote:
>> From: Lad, Prabhakar <prabhakar.lad@ti.com>
>>
>> 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’
>>
>> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
>> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
>> ---
>> Resending the patch since, it didn't reach the DLOS mailing list.
>>
>> drivers/media/platform/davinci/vpbe_osd.c | 16 ++++++++--------
>> 1 files changed, 8 insertions(+), 8 deletions(-)
>>
>> diff --git a/drivers/media/platform/davinci/vpbe_osd.c
>> b/drivers/media/platform/davinci/vpbe_osd.c index bba299d..9ab9280 100644
>> --- a/drivers/media/platform/davinci/vpbe_osd.c
>> +++ b/drivers/media/platform/davinci/vpbe_osd.c
>> @@ -46,14 +46,14 @@ static inline u32 osd_read(struct osd_state *sd, u32
>> offset) {
>> struct osd_state *osd = sd;
>>
>> - return readl(osd->osd_base + offset);
>> + return readl(IOMEM(osd->osd_base + offset));
>
> A better fix, in my opinion, would be to change the osd->osd_base field to be
> a void __iomem * instead of long unsigned int.
>
Ok I'll make it as void * and post a v2.
Regards,
--Prabhakar
>> }
>>
>> static inline u32 osd_write(struct osd_state *sd, u32 val, u32 offset)
>> {
>> struct osd_state *osd = sd;
>>
>> - writel(val, osd->osd_base + offset);
>> + writel(val, IOMEM(osd->osd_base + offset));
>>
>> return val;
>> }
>> @@ -63,9 +63,9 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask,
>> u32 offset) struct osd_state *osd = sd;
>>
>> u32 addr = osd->osd_base + offset;
>> - u32 val = readl(addr) | mask;
>> + u32 val = readl(IOMEM(addr)) | mask;
>>
>> - writel(val, addr);
>> + writel(val, IOMEM(addr));
>>
>> return val;
>> }
>> @@ -75,9 +75,9 @@ static inline u32 osd_clear(struct osd_state *sd, u32
>> mask, u32 offset) struct osd_state *osd = sd;
>>
>> u32 addr = osd->osd_base + offset;
>> - u32 val = readl(addr) & ~mask;
>> + u32 val = readl(IOMEM(addr)) & ~mask;
>>
>> - writel(val, addr);
>> + writel(val, IOMEM(addr));
>>
>> return val;
>> }
>> @@ -88,9 +88,9 @@ static inline u32 osd_modify(struct osd_state *sd, u32
>> mask, u32 val, struct osd_state *osd = sd;
>>
>> u32 addr = osd->osd_base + offset;
>> - u32 new_val = (readl(addr) & ~mask) | (val & mask);
>> + u32 new_val = (readl(IOMEM(addr)) & ~mask) | (val & mask);
>>
>> - writel(new_val, addr);
>> + writel(new_val, IOMEM(addr));
>>
>> return new_val;
>> }
> --
> Regards,
>
> Laurent Pinchart
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-23 10:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-22 12:17 [PATCH RESEND] media: davinci: vpbe: fix build warning Prabhakar Lad
2012-10-22 12:23 ` Laurent Pinchart
2012-10-23 10:47 ` Prabhakar Lad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox