Re: [PATCH 16/25] parisc: Use Kbuild infrastructure to handleasm-generic headers

From: Steven Rostedt
Date: Sat Oct 13 2012 - 10:17:09 EST


On Sat, 2012-10-13 at 13:36 +0100, James Bottomley wrote:
> On Fri, 2012-10-12 at 22:26 -0400, Steven Rostedt wrote:
> > plain text document attachment
> > (0016-parisc-Use-Kbuild-infrastructure-to-handle-asm-gener.patch)
> > From: Steven Rostedt <srostedt@xxxxxxxxxx>
> >
> > Use Kbuild infrastructure to handle the asm-generic headers
> > and remove the wrapper headers that call them.
> >
> > This only affects headers that do nothing but include the generic
> > equivalent. It does not touch any header that does a little more.
> >
> > Cc: linux-kbuild@xxxxxxxxxxxxxxx
> > Cc: linux-parisc@xxxxxxxxxxxxxxx
> > Cc: "James E.J. Bottomley" <jejb@xxxxxxxxxxxxxxxx>
> > Cc: Helge Deller <deller@xxxxxx>
> > Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx>
>
> Actually, we're already evaluating a patch like this:
>
> http://marc.info/?l=linux-kernel&m=134883983019018
>
> When I compare the two, I notice you missed a few (segment.h, vga.h,
> hw_irq.h, mutex.h), so you probably want to adjust your scripts.
>

Scripts? Naw I did this by hand:

cd arch/parisc/include/asm
vim `grep -l asm-generic *.h`

And in another terminal added the changes needed to Kbuild. I did this
by hand because it would have taken me the same time to verify scripts
to do it. By doing it by hand, I was less likely to add something that I
shouldn't have.

As Arnd mentioned, I didn't do a compare to check if what is in the
header is identical to the asm-generic version. That was going to be
"take 2". As this was just removing the simple cases of either:

foo.h:
#include <asm-generic/foo.h>

or

foo.h:
#ifndef _ASM_PARISC_FOO_H
#define _ASM_PARISC_FOO_H
#include <asm-generic/foo.h>
#endif

As for the ones I missed:

mutex.h has:

#include <asm-generic/mutex-dec.h>

which did not match mutex.h, so I ignored it. It would be removed in
"take 2" because it's identical to asm-generic/mutex.h.

segment.h:
#ifndef __PARISC_SEGMENT_H
#define __PARISC_SEGMENT_H

/* Only here because we have some old header files that expect it.. */

#endif


It missed the 'grep -l asm-generic' part.

vga.h and hw_irq.h are also empty (no asm-generic added). segment.h and
hw_irq.h are also empty in asm-generic, so they could be removed in take
2 as well. vga.h has some defines, but probably wouldn't affect parisc.

I don't care if you take this patch or not. As long as the old method of
adding a stub file to include asm-generic/foo.h is removed. This patch
set was caused by my frustration of looking at how to add a new
asm-generic file and coming up with the wrong implementation, and I want
to make sure that this doesn't happen again with another developer.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/