[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.55.0807211222250.23386@cliff.in.clinika.pl>
Date: Mon, 21 Jul 2008 12:31:06 +0100 (BST)
From: "Maciej W. Rozycki" <macro@...ux-mips.org>
To: Mikael Pettersson <mikpe@...uu.se>
cc: Ingo Molnar <mingo@...e.hu>, Chuck Ebbert <cebbert@...hat.com>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: PIC, L-APIC and I/O APIC debug information
On Mon, 21 Jul 2008, Mikael Pettersson wrote:
> > +#define __apicdebuginit(type) static type __init
> ...
> > -void __init print_IO_APIC(void)
> > +
> > +__apicdebuginit(void) print_IO_APIC(void)
> > {
>
> I _really_ dislike how this abuses the C macro preprocessor
> to create pointless new syntax.
>
> Since you're editing these function definitions anyway why
> not just spell out "static void __init" in readable proper C?
This is so that while debugging you can make all these functions global
with a single change in one place, rather than going through the whole
file and finding all the relevant function headers. Presumably the
original reason for the existence of the macro. Unfortunately an
object-like macro cannot be used here, as the "static" keyword has to come
first in a function declaration and the section attribute has to come
after the type designation.
What's wrong with the syntax in your opinion?
Maciej
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists