* [PATCH] arc: fix iounmap prototype
@ 2018-01-02 11:01 Arnd Bergmann
2018-01-02 14:23 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2018-01-02 11:01 UTC (permalink / raw)
Cc: Andrew Morton, linux-arch, Arnd Bergmann, Vineet Gupta,
linux-snps-arc, linux-kernel
The missing 'volatile' keyword on the iounmap argument leads to lots of
harmless warnings in an allmodconfig build:
sound/pci/echoaudio/echoaudio.c:1879:10: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier f
pointer target type [-Wdiscarded-qualifiers]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arc/include/asm/io.h | 4 ++--
arch/arc/mm/ioremap.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h
index c22b181e8206..2c9b98fabf82 100644
--- a/arch/arc/include/asm/io.h
+++ b/arch/arc/include/asm/io.h
@@ -30,11 +30,11 @@ static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
return (void __iomem *)port;
}
-static inline void ioport_unmap(void __iomem *addr)
+static inline void ioport_unmap(volatile void __iomem *addr)
{
}
-extern void iounmap(const void __iomem *addr);
+extern void iounmap(const volatile void __iomem *addr);
#define ioremap_nocache(phy, sz) ioremap(phy, sz)
#define ioremap_wc(phy, sz) ioremap(phy, sz)
diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c
index 9881bd740ccc..94d0116063a8 100644
--- a/arch/arc/mm/ioremap.c
+++ b/arch/arc/mm/ioremap.c
@@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
EXPORT_SYMBOL(ioremap_prot);
-void iounmap(const void __iomem *addr)
+void iounmap(volatile const void __iomem *addr)
{
/* weird double cast to handle phys_addr_t > 32 bits */
if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arc: fix iounmap prototype
2018-01-02 11:01 [PATCH] arc: fix iounmap prototype Arnd Bergmann
@ 2018-01-02 14:23 ` Geert Uytterhoeven
2018-01-02 14:23 ` Geert Uytterhoeven
2018-01-19 19:31 ` Vineet Gupta
0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-01-02 14:23 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Linux-Arch, Vineet Gupta, arcml,
Linux Kernel Mailing List
Hi Arnd,
On Tue, Jan 2, 2018 at 12:01 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The missing 'volatile' keyword on the iounmap argument leads to lots of
> harmless warnings in an allmodconfig build:
>
> sound/pci/echoaudio/echoaudio.c:1879:10: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier f
> pointer target type [-Wdiscarded-qualifiers]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arc/include/asm/io.h | 4 ++--
> arch/arc/mm/ioremap.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h
> index c22b181e8206..2c9b98fabf82 100644
> --- a/arch/arc/include/asm/io.h
> +++ b/arch/arc/include/asm/io.h
> @@ -30,11 +30,11 @@ static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
> return (void __iomem *)port;
> }
>
> -static inline void ioport_unmap(void __iomem *addr)
> +static inline void ioport_unmap(volatile void __iomem *addr)
> {
> }
>
> -extern void iounmap(const void __iomem *addr);
> +extern void iounmap(const volatile void __iomem *addr);
Note that include/asm-generic/io.h also lacks the volatiles?
>
> #define ioremap_nocache(phy, sz) ioremap(phy, sz)
> #define ioremap_wc(phy, sz) ioremap(phy, sz)
> diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c
> index 9881bd740ccc..94d0116063a8 100644
> --- a/arch/arc/mm/ioremap.c
> +++ b/arch/arc/mm/ioremap.c
> @@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
> EXPORT_SYMBOL(ioremap_prot);
>
>
> -void iounmap(const void __iomem *addr)
> +void iounmap(volatile const void __iomem *addr)
const volatile?
> {
> /* weird double cast to handle phys_addr_t > 32 bits */
> if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
Gr{oetje,eeting}s,
Geert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arc: fix iounmap prototype
2018-01-02 14:23 ` Geert Uytterhoeven
@ 2018-01-02 14:23 ` Geert Uytterhoeven
2018-01-19 19:31 ` Vineet Gupta
1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2018-01-02 14:23 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andrew Morton, Linux-Arch, Vineet Gupta, arcml,
Linux Kernel Mailing List
Hi Arnd,
On Tue, Jan 2, 2018 at 12:01 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> The missing 'volatile' keyword on the iounmap argument leads to lots of
> harmless warnings in an allmodconfig build:
>
> sound/pci/echoaudio/echoaudio.c:1879:10: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier f
> pointer target type [-Wdiscarded-qualifiers]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/arc/include/asm/io.h | 4 ++--
> arch/arc/mm/ioremap.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h
> index c22b181e8206..2c9b98fabf82 100644
> --- a/arch/arc/include/asm/io.h
> +++ b/arch/arc/include/asm/io.h
> @@ -30,11 +30,11 @@ static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
> return (void __iomem *)port;
> }
>
> -static inline void ioport_unmap(void __iomem *addr)
> +static inline void ioport_unmap(volatile void __iomem *addr)
> {
> }
>
> -extern void iounmap(const void __iomem *addr);
> +extern void iounmap(const volatile void __iomem *addr);
Note that include/asm-generic/io.h also lacks the volatiles?
>
> #define ioremap_nocache(phy, sz) ioremap(phy, sz)
> #define ioremap_wc(phy, sz) ioremap(phy, sz)
> diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c
> index 9881bd740ccc..94d0116063a8 100644
> --- a/arch/arc/mm/ioremap.c
> +++ b/arch/arc/mm/ioremap.c
> @@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
> EXPORT_SYMBOL(ioremap_prot);
>
>
> -void iounmap(const void __iomem *addr)
> +void iounmap(volatile const void __iomem *addr)
const volatile?
> {
> /* weird double cast to handle phys_addr_t > 32 bits */
> if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arc: fix iounmap prototype
2018-01-02 14:23 ` Geert Uytterhoeven
2018-01-02 14:23 ` Geert Uytterhoeven
@ 2018-01-19 19:31 ` Vineet Gupta
1 sibling, 0 replies; 4+ messages in thread
From: Vineet Gupta @ 2018-01-19 19:31 UTC (permalink / raw)
To: Geert Uytterhoeven, Arnd Bergmann
Cc: Andrew Morton, Linux-Arch, arcml, Linux Kernel Mailing List
On 01/02/2018 06:23 AM, Geert Uytterhoeven wrote:
> Hi Arnd,
>
> On Tue, Jan 2, 2018 at 12:01 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> The missing 'volatile' keyword on the iounmap argument leads to lots of
>> harmless warnings in an allmodconfig build:
>>
>> sound/pci/echoaudio/echoaudio.c:1879:10: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier f
>> pointer target type [-Wdiscarded-qualifiers]
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd, do you agree to Geert's comments - if you are busy I can respin a v2 ?
Thx,
-Vineet
>> ---
>> arch/arc/include/asm/io.h | 4 ++--
>> arch/arc/mm/ioremap.c | 2 +-
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arc/include/asm/io.h b/arch/arc/include/asm/io.h
>> index c22b181e8206..2c9b98fabf82 100644
>> --- a/arch/arc/include/asm/io.h
>> +++ b/arch/arc/include/asm/io.h
>> @@ -30,11 +30,11 @@ static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
>> return (void __iomem *)port;
>> }
>>
>> -static inline void ioport_unmap(void __iomem *addr)
>> +static inline void ioport_unmap(volatile void __iomem *addr)
>> {
>> }
>>
>> -extern void iounmap(const void __iomem *addr);
>> +extern void iounmap(const volatile void __iomem *addr);
>
> Note that include/asm-generic/io.h also lacks the volatiles?
>
>>
>> #define ioremap_nocache(phy, sz) ioremap(phy, sz)
>> #define ioremap_wc(phy, sz) ioremap(phy, sz)
>> diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c
>> index 9881bd740ccc..94d0116063a8 100644
>> --- a/arch/arc/mm/ioremap.c
>> +++ b/arch/arc/mm/ioremap.c
>> @@ -95,7 +95,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
>> EXPORT_SYMBOL(ioremap_prot);
>>
>>
>> -void iounmap(const void __iomem *addr)
>> +void iounmap(volatile const void __iomem *addr)
>
> const volatile?
>
>> {
>> /* weird double cast to handle phys_addr_t > 32 bits */
>> if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
>
> Gr{oetje,eeting}s,
>
> Geert
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-19 19:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-02 11:01 [PATCH] arc: fix iounmap prototype Arnd Bergmann
2018-01-02 14:23 ` Geert Uytterhoeven
2018-01-02 14:23 ` Geert Uytterhoeven
2018-01-19 19:31 ` Vineet Gupta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox