* [PATCH] Type qualifiers in __ia64_get_io_port_base
@ 2005-07-19 1:20 Ian Wienand
2005-07-19 2:06 ` david mosberger
2005-07-19 2:36 ` Ian Wienand
0 siblings, 2 replies; 3+ messages in thread
From: Ian Wienand @ 2005-07-19 1:20 UTC (permalink / raw)
To: linux-ia64
Fix
include/asm/io.h:125: warning: type qualifiers ignored on function return type
produced by gcc 4
According to http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00814.html
the type qualifier is superfluous.
--
Signed-Off-By: Ian Wienand <ianw@gelato.unsw.edu.au>
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -120,7 +120,7 @@ static inline void ___ia64_mmiowb(void)
ia64_mfa();
}
-static inline const unsigned long
+static inline unsigned long
__ia64_get_io_port_base (void)
{
extern unsigned long ia64_iobase;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Type qualifiers in __ia64_get_io_port_base
2005-07-19 1:20 [PATCH] Type qualifiers in __ia64_get_io_port_base Ian Wienand
@ 2005-07-19 2:06 ` david mosberger
2005-07-19 2:36 ` Ian Wienand
1 sibling, 0 replies; 3+ messages in thread
From: david mosberger @ 2005-07-19 2:06 UTC (permalink / raw)
To: linux-ia64
This one is wrong. It should use __attribute_const__ instead. If you
just drop the "const", it will result in worse code.
--david
On 7/18/05, Ian Wienand <ianw@gelato.unsw.edu.au> wrote:
> Fix
>
> include/asm/io.h:125: warning: type qualifiers ignored on function return type
>
> produced by gcc 4
>
> According to http://gcc.gnu.org/ml/gcc-patches/2000-10/msg00814.html
> the type qualifier is superfluous.
>
> --
>
> Signed-Off-By: Ian Wienand <ianw@gelato.unsw.edu.au>
>
> diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
> --- a/include/asm-ia64/io.h
> +++ b/include/asm-ia64/io.h
> @@ -120,7 +120,7 @@ static inline void ___ia64_mmiowb(void)
> ia64_mfa();
> }
>
> -static inline const unsigned long
> +static inline unsigned long
> __ia64_get_io_port_base (void)
> {
> extern unsigned long ia64_iobase;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Type qualifiers in __ia64_get_io_port_base
2005-07-19 1:20 [PATCH] Type qualifiers in __ia64_get_io_port_base Ian Wienand
2005-07-19 2:06 ` david mosberger
@ 2005-07-19 2:36 ` Ian Wienand
1 sibling, 0 replies; 3+ messages in thread
From: Ian Wienand @ 2005-07-19 2:36 UTC (permalink / raw)
To: linux-ia64
On Mon, Jul 18, 2005 at 07:06:55PM -0700, david mosberger wrote:
> This one is wrong. It should use __attribute_const__ instead. If you
> just drop the "const", it will result in worse code.
Ok, I see why reading about attribute const. Thanks!
--
Signed-Off-By: Ian Wienand <ianw@gelato.unsw.edu.au>
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -120,7 +120,7 @@ static inline void ___ia64_mmiowb(void)
ia64_mfa();
}
-static inline const unsigned long
+static inline __attribute_const__ unsigned long
__ia64_get_io_port_base (void)
{
extern unsigned long ia64_iobase;
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-19 2:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-19 1:20 [PATCH] Type qualifiers in __ia64_get_io_port_base Ian Wienand
2005-07-19 2:06 ` david mosberger
2005-07-19 2:36 ` Ian Wienand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox