* [patch] use __attribute__ in asm-powerpc
@ 2007-07-15 3:36 Mike Frysinger
2007-07-16 9:18 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2007-07-15 3:36 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev, linux-kernel
Pretty much everyone uses "__attribute__" or "attribute", no one
uses "__attribute". This patch tweaks the three places in asm-powerpc where
this comes up. While only asm-powerpc/types.h is interesting (for userspace),
I did asm-powerpc/processor.h as well for consistency.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h
index d947b16..2ce6ea6 100644
--- a/include/asm-powerpc/processor.h
+++ b/include/asm-powerpc/processor.h
@@ -153,9 +153,9 @@ struct thread_struct {
unsigned long dabr; /* Data address breakpoint register */
#ifdef CONFIG_ALTIVEC
/* Complete AltiVec register set */
- vector128 vr[32] __attribute((aligned(16)));
+ vector128 vr[32] __attribute__((aligned(16)));
/* AltiVec status */
- vector128 vscr __attribute((aligned(16)));
+ vector128 vscr __attribute__((aligned(16)));
unsigned long vrsave;
int used_vr; /* set if process has used altivec */
#endif /* CONFIG_ALTIVEC */
diff --git a/include/asm-powerpc/types.h b/include/asm-powerpc/types.h
index 3b36375..a584341 100644
--- a/include/asm-powerpc/types.h
+++ b/include/asm-powerpc/types.h
@@ -48,7 +48,7 @@ typedef unsigned long long __u64;
typedef struct {
__u32 u[4];
-} __attribute((aligned(16))) __vector128;
+} __attribute__((aligned(16))) __vector128;
#endif /* __ASSEMBLY__ */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [patch] use __attribute__ in asm-powerpc
2007-07-15 3:36 [patch] use __attribute__ in asm-powerpc Mike Frysinger
@ 2007-07-16 9:18 ` Geert Uytterhoeven
2007-07-16 9:20 ` Robert P. J. Day
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2007-07-16 9:18 UTC (permalink / raw)
To: Mike Frysinger; +Cc: linuxppc-dev, paulus, linux-kernel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1595 bytes --]
On Sat, 14 Jul 2007, Mike Frysinger wrote:
> Pretty much everyone uses "__attribute__" or "attribute", no one
> uses "__attribute". This patch tweaks the three places in asm-powerpc where
> this comes up. While only asm-powerpc/types.h is interesting (for userspace),
> I did asm-powerpc/processor.h as well for consistency.
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
> diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h
> index d947b16..2ce6ea6 100644
> --- a/include/asm-powerpc/processor.h
> +++ b/include/asm-powerpc/processor.h
> @@ -153,9 +153,9 @@ struct thread_struct {
> unsigned long dabr; /* Data address breakpoint register */
> #ifdef CONFIG_ALTIVEC
> /* Complete AltiVec register set */
> - vector128 vr[32] __attribute((aligned(16)));
> + vector128 vr[32] __attribute__((aligned(16)));
If the code is not exported to userspace (and thus not subject to different
compilers), I think the preferred form is plain `attribute'.
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use __attribute__ in asm-powerpc
2007-07-16 9:18 ` Geert Uytterhoeven
@ 2007-07-16 9:20 ` Robert P. J. Day
2007-07-16 9:30 ` Andreas Schwab
2007-07-16 16:51 ` Mike Frysinger
2 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2007-07-16 9:20 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: paulus, Mike Frysinger, linux-kernel, linuxppc-dev
On Mon, 16 Jul 2007, Geert Uytterhoeven wrote:
> On Sat, 14 Jul 2007, Mike Frysinger wrote:
> > Pretty much everyone uses "__attribute__" or "attribute", no one
> > uses "__attribute". This patch tweaks the three places in asm-powerpc where
> > this comes up. While only asm-powerpc/types.h is interesting (for userspace),
> > I did asm-powerpc/processor.h as well for consistency.
> >
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > ---
> > diff --git a/include/asm-powerpc/processor.h b/include/asm-powerpc/processor.h
> > index d947b16..2ce6ea6 100644
> > --- a/include/asm-powerpc/processor.h
> > +++ b/include/asm-powerpc/processor.h
> > @@ -153,9 +153,9 @@ struct thread_struct {
> > unsigned long dabr; /* Data address breakpoint register */
> > #ifdef CONFIG_ALTIVEC
> > /* Complete AltiVec register set */
> > - vector128 vr[32] __attribute((aligned(16)));
> > + vector128 vr[32] __attribute__((aligned(16)));
>
> If the code is not exported to userspace (and thus not subject to
> different compilers), I think the preferred form is plain
> `attribute'.
compiler-gcc.h also defines the common form of the shortcut:
#define __aligned(x) __attribute__((aligned(x)))
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use __attribute__ in asm-powerpc
2007-07-16 9:18 ` Geert Uytterhoeven
2007-07-16 9:20 ` Robert P. J. Day
@ 2007-07-16 9:30 ` Andreas Schwab
2007-07-16 16:51 ` Mike Frysinger
2 siblings, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2007-07-16 9:30 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev, Mike Frysinger, linux-kernel, paulus
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> writes:
> If the code is not exported to userspace (and thus not subject to different
> compilers), I think the preferred form is plain `attribute'.
That does not exist without underscores.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] use __attribute__ in asm-powerpc
2007-07-16 9:18 ` Geert Uytterhoeven
2007-07-16 9:20 ` Robert P. J. Day
2007-07-16 9:30 ` Andreas Schwab
@ 2007-07-16 16:51 ` Mike Frysinger
2 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2007-07-16 16:51 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linuxppc-dev, paulus, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
On Monday 16 July 2007, Geert Uytterhoeven wrote:
> On Sat, 14 Jul 2007, Mike Frysinger wrote:
> > Pretty much everyone uses "__attribute__" or "attribute", no one
> > uses "__attribute". This patch tweaks the three places in asm-powerpc
> > where this comes up. While only asm-powerpc/types.h is interesting (for
> > userspace), I did asm-powerpc/processor.h as well for consistency.
> >
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > ---
> > diff --git a/include/asm-powerpc/processor.h
> > b/include/asm-powerpc/processor.h index d947b16..2ce6ea6 100644
> > --- a/include/asm-powerpc/processor.h
> > +++ b/include/asm-powerpc/processor.h
> > @@ -153,9 +153,9 @@ struct thread_struct {
> > unsigned long dabr; /* Data address breakpoint register */
> > #ifdef CONFIG_ALTIVEC
> > /* Complete AltiVec register set */
> > - vector128 vr[32] __attribute((aligned(16)));
> > + vector128 vr[32] __attribute__((aligned(16)));
>
> If the code is not exported to userspace (and thus not subject to different
> compilers), I think the preferred form is plain `attribute'.
i never said asm-powerpc/processor.h was exported to userspace ... i did say
that i changed the file to be consistent with all other files.
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-07-16 16:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-15 3:36 [patch] use __attribute__ in asm-powerpc Mike Frysinger
2007-07-16 9:18 ` Geert Uytterhoeven
2007-07-16 9:20 ` Robert P. J. Day
2007-07-16 9:30 ` Andreas Schwab
2007-07-16 16:51 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).