From: Ralf Baechle <ralf@linux-mips.org>
To: "Ardelean, Andrei" <Andrei.Ardelean@idt.com>
Cc: linux-mips@linux-mips.org
Subject: Re: Porting Linux MIPS issue: maltaint.h files
Date: Fri, 17 Sep 2010 00:57:39 +0100 [thread overview]
Message-ID: <20100916235739.GA16949@linux-mips.org> (raw)
In-Reply-To: <AEA634773855ED4CAD999FBB1A66D076010CFA4E@CORPEXCH1.na.ads.idt.com>
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
next prev parent reply other threads:[~2010-09-16 23:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 20:04 Porting Linux MIPS issue: maltaint.h files Ardelean, Andrei
2010-09-15 20:04 ` Ardelean, Andrei
2010-09-16 23:57 ` Ralf Baechle [this message]
2010-09-17 15:57 ` Ralf Baechle
2010-09-17 21:41 ` Ardelean, Andrei
2010-09-17 21:41 ` Ardelean, Andrei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100916235739.GA16949@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=Andrei.Ardelean@idt.com \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.