[Top] [All Lists]

Re: Porting Linux MIPS issue: maltaint.h files

To: "Ardelean, Andrei" <>
Subject: Re: Porting Linux MIPS issue: maltaint.h files
From: Ralf Baechle <>
Date: Fri, 17 Sep 2010 00:57:39 +0100
In-reply-to: <>
References: <>
User-agent: Mutt/1.5.20 (2009-12-10)
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.


<Prev in Thread] Current Thread [Next in Thread>