From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423347AbXD3PPp (ORCPT ); Mon, 30 Apr 2007 11:15:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1423351AbXD3PPm (ORCPT ); Mon, 30 Apr 2007 11:15:42 -0400 Received: from mail1.asahi-net.or.jp ([202.224.39.197]:57742 "EHLO mail.asahi-net.or.jp" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755424AbXD3PPT (ORCPT ); Mon, 30 Apr 2007 11:15:19 -0400 Date: Tue, 01 May 2007 00:15:15 +0900 Message-ID: From: Yoshinori Sato To: Andrew Morton Cc: lkml Subject: Re: [PATCH] h8300 generic irq In-Reply-To: <20070427190935.68606a3a.akpm@linux-foundation.org> References: <20070427190935.68606a3a.akpm@linux-foundation.org> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.95 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 27 Apr 2007 19:09:35 -0700, Andrew Morton wrote: > > On Thu, 26 Apr 2007 17:34:37 +0900 > Yoshinori Sato wrote: > > > h8300 using generic irq handler patch. > > > > Signed-off-by: Yoshinori Sato > > > > Minor things: > > > > > --- /dev/null > > +++ b/arch/h8300/kernel/irq.c > > @@ -0,0 +1,211 @@ > > +/* > > + * linux/arch/h8300/kernel/irq.c > > + * > > + * Copyright 2007 Yoshinori Sato > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +/*#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) > >