* [RFC: Style] Kernel coding style for Extended Attributes.
@ 2009-06-03 15:37 Michael S. Zick
2009-06-03 15:45 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Zick @ 2009-06-03 15:37 UTC (permalink / raw)
To: linux-kernel; +Cc: Linus Torvalds
Group;
I notice two different styles being used:
__attribute__ (( ....
__attribute__(( ....
The gcc documentation does not make a comment on this,
in fact, the extended attribute doc page uses both. ;)
As a matter of fact, there are macros defined that have
both (not at once) expansions.
Is there a recommended style for the kernel source?
Mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC: Style] Kernel coding style for Extended Attributes.
2009-06-03 15:37 [RFC: Style] Kernel coding style for Extended Attributes Michael S. Zick
@ 2009-06-03 15:45 ` Linus Torvalds
2009-06-03 17:11 ` Michael S. Zick
0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2009-06-03 15:45 UTC (permalink / raw)
To: Michael S. Zick; +Cc: linux-kernel
On Wed, 3 Jun 2009, Michael S. Zick wrote:
>
> Is there a recommended style for the kernel source?
I think the recommended style is:
"Hide them behind a macro so that they never show up in the source".
and then basically nobody will care about whether there is a space between
the __attribute__ and '(('.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC: Style] Kernel coding style for Extended Attributes.
2009-06-03 15:45 ` Linus Torvalds
@ 2009-06-03 17:11 ` Michael S. Zick
2009-06-03 19:39 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Zick @ 2009-06-03 17:11 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
On Wed June 3 2009, Linus Torvalds wrote:
>
> On Wed, 3 Jun 2009, Michael S. Zick wrote:
> >
> > Is there a recommended style for the kernel source?
>
> I think the recommended style is:
>
> "Hide them behind a macro so that they never show up in the source".
>
That seems to be the general consensus in (/by) practice.
Thanks,
Mike
> and then basically nobody will care about whether there is a space between
> the __attribute__ and '(('.
>
> Linus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFC: Style] Kernel coding style for Extended Attributes.
2009-06-03 17:11 ` Michael S. Zick
@ 2009-06-03 19:39 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2009-06-03 19:39 UTC (permalink / raw)
To: Michael S. Zick; +Cc: Linus Torvalds, linux-kernel
On Wed, Jun 03, 2009 at 12:11:47PM -0500, Michael S. Zick wrote:
> On Wed June 3 2009, Linus Torvalds wrote:
> >
> > On Wed, 3 Jun 2009, Michael S. Zick wrote:
> > >
> > > Is there a recommended style for the kernel source?
> >
> > I think the recommended style is:
> >
> > "Hide them behind a macro so that they never show up in the source".
> >
>
> That seems to be the general consensus in (/by) practice.
Use __section() to define a section.
See init.h for usage and compiler.h for definition.
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-03 19:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-03 15:37 [RFC: Style] Kernel coding style for Extended Attributes Michael S. Zick
2009-06-03 15:45 ` Linus Torvalds
2009-06-03 17:11 ` Michael S. Zick
2009-06-03 19:39 ` Sam Ravnborg
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.