Re: [PATCH] Cleanup i386 <linux/init.h> abuses

Tom Rini (trini@kernel.crashing.org)
Fri, 7 Jun 2002 12:26:14 -0700


On Fri, Jun 07, 2002 at 01:01:45PM +0200, Pavel Machek wrote:
> Hi!
>
> > The following patch cleans up the i386 usage of <linux/init.h>.
> > This remove <linux/init.h> from <asm-i386/system.h> which did not need
> > it, <asm-i386/highmem.h> which only had it due to an extern using
> > __init, which is not needed.
> > This adds <linux/init.h> to <asm-i386/bugs.h> which actually has
> > numerous __init functions and adds <linux/init.h> to 9 files inside of
> > arch/i386 which were indirectly including <linux/init.h> previously.
>
>
> @@ -33,7 +32,7 @@
> extern pgprot_t kmap_prot;
> extern pte_t *pkmap_page_table;
>
> -extern void kmap_init(void) __init;
> +extern void kmap_init(void);
>
> /*
> * Right now we initialize only a single pte table. It can be
> extended
>
>
> __init is usefull as a documentation... Perhaps adding /* This is
> __init function */ would be good.

The use of __init in externs is done very infrequently right now, and is
probably causing <linux/init.h> to be included in a few more headers
that probably don't need it and thus masking the bugs in some .c files.

I also think it makes very poor documentation right now since it's done
a total of 24 times, and should probably be removed for consistency. Or
left alone since <linux/init.h> mentions you can do it.

But personally, I'm against doing it.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
-
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/