public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] h8300 generic irq
Date: Tue, 01 May 2007 00:15:15 +0900	[thread overview]
Message-ID: <m2irbd51x8.wl%ysato@users.sourceforge.jp> (raw)
In-Reply-To: <20070427190935.68606a3a.akpm@linux-foundation.org>

At Fri, 27 Apr 2007 19:09:35 -0700,
Andrew Morton wrote:
> 
> On Thu, 26 Apr 2007 17:34:37 +0900
> Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> 
> > h8300 using generic irq handler patch.
> > 
> > Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
> > 
> 
> Minor things:
> 
> >
> > --- /dev/null
> > +++ b/arch/h8300/kernel/irq.c
> > @@ -0,0 +1,211 @@
> > +/*
> > + * linux/arch/h8300/kernel/irq.c
> > + *
> > + * Copyright 2007 Yoshinori Sato <ysato@users.sourceforge.jp>
> > + */
> > +
> > +#include <linux/module.h>
> > +#include <linux/types.h>
> > +#include <linux/kernel.h>
> > +#include <linux/sched.h>
> > +#include <linux/kernel_stat.h>
> > +#include <linux/seq_file.h>
> > +#include <linux/init.h>
> > +#include <linux/random.h>
> > +#include <linux/bootmem.h>
> > +#include <linux/irq.h>
> > +
> > +#include <asm/system.h>
> > +#include <asm/traps.h>
> > +#include <asm/io.h>
> > +#include <asm/setup.h>
> > +#include <asm/errno.h>
> > +
> > +/*#define DEBUG*/
> > +
> > +extern unsigned long *interrupt_redirect_table;
> > +extern const int h8300_saved_vectors[];
> > +extern const unsigned long h8300_trap_table[];
> > +int h8300_enable_irq_pin(unsigned int irq);
> > +void h8300_disable_irq_pin(unsigned int irq);
> 
> Please always avoid putting extern declarations into C files.  Please them
> in a header file which is visible tot he definition site asw well as all
> callers/users.
> 
> For something which is defined in assembly code (like
> interrupt_redirect_table) it isn't so clear, because we cannot do
> typechecking.  But I think it's still best to include the declaration in a
> header file so that we only have to declare it once.  Plus it _is_ a global
> symbol.

I was sure. correct it.
 
> > +
> > +/*
> > + * h8300 interrupt controler implementation
> > + */
> > +struct irq_chip h8300irq_chip = {
> > +	.name		= "H8300-INTC",
> > +	.startup	= h8300_startup_irq,
> > +	.shutdown	= h8300_shutdown_irq,
> > +	.enable		= h8300_enable_irq,
> > +	.disable	= h8300_disable_irq,
> > +	.ack		= NULL,
> > +	.end		= h8300_end_irq,
> > +};
> 
> I think this could have static scope.

I do not need to refer from the outside.
I make a change in static.
 
> > +void ack_bad_irq(unsigned int irq)
> > +{
> > +	printk("unexpected IRQ trap at vector %02x\n", irq);
> > +}
> 
> printks should generally have facility levels (KERN_*)
> 
> > +		panic("interrupt vector serup failed.");
> 
> typo
> 
> > +	for ( i = 0; i < NR_IRQS; i++) {
> 
> 	for (i = 0
> 
> > +		if (i == *saved_vector) {
> > +			ramvec_p++;
> > +			saved_vector++;
> > +		} else {
> > +			if ( i < NR_TRAPS ) {
> 
> 			if (i < NR_TRAPS)
> 
> 

      parent reply	other threads:[~2007-04-30 15:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-26  8:34 [PATCH] h8300 generic irq Yoshinori Sato
2007-04-28  2:09 ` Andrew Morton
2007-04-28  8:42   ` Christoph Hellwig
2007-04-30 15:15   ` Yoshinori Sato [this message]

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=m2irbd51x8.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox