Re: Porting Linux MIPS issue: maltaint.h files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 15, 2010 at 01:04:02PM -0700, Ardelean, Andrei wrote:

> I am porting LINUX MIPS from MALTA on a new board. The problem is that
> .../mips-boards/maltaint.h files is included in a non-MALTA specific
> file, irq-gic.c, without #ifdef CONFIG_MALTA protection. The only need
> there is for the following constant:
> #define X			0xdead

That's just poor programming style.  1 character long names in headers are
begging for conflicts and with few exceptions as the universal loop index
variables i, j, k are not descriptive.

Including system specific headers hinders code reusability and reusability
is the reason why most of the irq-*.c files are in arch/mips/kernel and not
hidden away in some platform specific directory.

> What is the recommended way to follow since I will replace maltaint.h
> with my new file gdint.h?

Post a patch to cleanup the mess.

In this case (and I haven't looked at it for more than 30s ...) it seems
that the constant X should be moved into <asm/gic.h> after which the
inclusion of the Malta header can go away.

  Ralf



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux