This patch contains the following cleanups:
- #include <linux/irq.h> for getting the prototypes of
{dis,en}able_irq()
- make the needlessly global wd33c93_setup() static
Signed-off-by: Adrian Bunk <[email protected]>
--- linux-2.6.18-rc4-mm2/drivers/scsi/wd33c93.c.old 2006-08-21 03:16:42.000000000 +0200
+++ linux-2.6.18-rc4-mm2/drivers/scsi/wd33c93.c 2006-08-21 03:17:10.000000000 +0200
@@ -79,6 +79,7 @@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/blkdev.h>
+#include <linux/irq.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
@@ -1710,7 +1711,7 @@
static char setup_used[MAX_SETUP_ARGS];
static int done_setup = 0;
-int
+static int
wd33c93_setup(char *str)
{
int i;
On Mon, Aug 21, 2006 at 12:43:57PM +0200, Adrian Bunk wrote:
> This patch contains the following cleanups:
> - #include <linux/irq.h> for getting the prototypes of
> {dis,en}able_irq()
nothing outside of arch code must ever include <linux/irq.h>
On Mon, Aug 21, 2006 at 11:53:44AM +0100, Christoph Hellwig wrote:
> On Mon, Aug 21, 2006 at 12:43:57PM +0200, Adrian Bunk wrote:
> > This patch contains the following cleanups:
> > - #include <linux/irq.h> for getting the prototypes of
> > {dis,en}able_irq()
>
> nothing outside of arch code must ever include <linux/irq.h>
Why?
It sounds rather strange that non-arch code should use asm headers.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Mon, Aug 21, 2006 at 09:22:15PM +0200, Adrian Bunk wrote:
> It sounds rather strange that non-arch code should use asm headers.
It should get everything it needs from including <linux/interrupt.h>
On Mon, Aug 21, 2006 at 09:22:15PM +0200, Adrian Bunk wrote:
> On Mon, Aug 21, 2006 at 11:53:44AM +0100, Christoph Hellwig wrote:
> > On Mon, Aug 21, 2006 at 12:43:57PM +0200, Adrian Bunk wrote:
> > > This patch contains the following cleanups:
> > > - #include <linux/irq.h> for getting the prototypes of
> > > {dis,en}able_irq()
> >
> > nothing outside of arch code must ever include <linux/irq.h>
>
> Why?
> It sounds rather strange that non-arch code should use asm headers.
Still the wrong header. <linux/interrupt.h> is what you're looking for.
$ grep '\(en\|dis\)able_irq' include/linux/interrupt.h
extern void disable_irq_nosync(unsigned int irq);
extern void disable_irq(unsigned int irq);
extern void enable_irq(unsigned int irq);
static inline void disable_irq_nosync_lockdep(unsigned int irq)
disable_irq_nosync(irq);
static inline void disable_irq_lockdep(unsigned int irq)
disable_irq(irq);
static inline void enable_irq_lockdep(unsigned int irq)
enable_irq(irq);
static inline int enable_irq_wake(unsigned int irq)
static inline int disable_irq_wake(unsigned int irq)
# define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq)
# define disable_irq_lockdep(irq) disable_irq(irq)
# define enable_irq_lockdep(irq) enable_irq(irq)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
From: Adrian Bunk <[email protected]>
Date: Mon, 21 Aug 2006 21:22:15 +0200
> On Mon, Aug 21, 2006 at 11:53:44AM +0100, Christoph Hellwig wrote:
> > On Mon, Aug 21, 2006 at 12:43:57PM +0200, Adrian Bunk wrote:
> > > This patch contains the following cleanups:
> > > - #include <linux/irq.h> for getting the prototypes of
> > > {dis,en}able_irq()
> >
> > nothing outside of arch code must ever include <linux/irq.h>
>
> Why?
> It sounds rather strange that non-arch code should use asm headers.
It's an unfortunate side effect of how the generic IRQ layer was done.
The linux/irq.h head should only be used on platforms that make use of
the generic IRQ layer.
asm/irq.h is what should be included by drivers and the like that want
the IRQ interfaces.
I'm not saying this is a good situation, it's just the way it is.
On Mon, Aug 21, 2006 at 08:25:48PM +0100, Russell King wrote:
> On Mon, Aug 21, 2006 at 09:22:15PM +0200, Adrian Bunk wrote:
> > On Mon, Aug 21, 2006 at 11:53:44AM +0100, Christoph Hellwig wrote:
> > > On Mon, Aug 21, 2006 at 12:43:57PM +0200, Adrian Bunk wrote:
> > > > This patch contains the following cleanups:
> > > > - #include <linux/irq.h> for getting the prototypes of
> > > > {dis,en}able_irq()
> > >
> > > nothing outside of arch code must ever include <linux/irq.h>
> >
> > Why?
> > It sounds rather strange that non-arch code should use asm headers.
>
> Still the wrong header. <linux/interrupt.h> is what you're looking for.
>
> $ grep '\(en\|dis\)able_irq' include/linux/interrupt.h
> extern void disable_irq_nosync(unsigned int irq);
> extern void disable_irq(unsigned int irq);
> extern void enable_irq(unsigned int irq);
> static inline void disable_irq_nosync_lockdep(unsigned int irq)
> disable_irq_nosync(irq);
> static inline void disable_irq_lockdep(unsigned int irq)
> disable_irq(irq);
> static inline void enable_irq_lockdep(unsigned int irq)
> enable_irq(irq);
> static inline int enable_irq_wake(unsigned int irq)
> static inline int disable_irq_wake(unsigned int irq)
> # define disable_irq_nosync_lockdep(irq) disable_irq_nosync(irq)
> # define disable_irq_lockdep(irq) disable_irq(irq)
> # define enable_irq_lockdep(irq) enable_irq(irq)
Unfortunately, it isn't:
<-- snip -->
...
#ifdef CONFIG_GENERIC_HARDIRQS
extern void disable_irq_nosync(unsigned int irq);
extern void disable_irq(unsigned int irq);
extern void enable_irq(unsigned int irq);
...
<-- snip -->
> Russell King
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
On Mon, Aug 21, 2006 at 12:31:42PM -0700, David Miller wrote:
> From: Adrian Bunk <[email protected]>
> Date: Mon, 21 Aug 2006 21:22:15 +0200
>
> > On Mon, Aug 21, 2006 at 11:53:44AM +0100, Christoph Hellwig wrote:
> > > On Mon, Aug 21, 2006 at 12:43:57PM +0200, Adrian Bunk wrote:
> > > > This patch contains the following cleanups:
> > > > - #include <linux/irq.h> for getting the prototypes of
> > > > {dis,en}able_irq()
> > >
> > > nothing outside of arch code must ever include <linux/irq.h>
> >
> > Why?
> > It sounds rather strange that non-arch code should use asm headers.
>
> It's an unfortunate side effect of how the generic IRQ layer was done.
>
> The linux/irq.h head should only be used on platforms that make use of
> the generic IRQ layer.
>
> asm/irq.h is what should be included by drivers and the like that want
> the IRQ interfaces.
>
> I'm not saying this is a good situation, it's just the way it is.
What a mess...
Updated patch below.
cu
Adrian
<-- snip -->
This patch contains the following cleanups:
- #include <asm/irq.h> for getting the prototypes of
{dis,en}able_irq()
- make the needlessly global wd33c93_setup() static
Signed-off-by: Adrian Bunk <[email protected]>
--- linux-2.6.18-rc5-mm1/drivers/scsi/wd33c93.c.old 2006-09-04 01:45:57.000000000 +0200
+++ linux-2.6.18-rc5-mm1/drivers/scsi/wd33c93.c 2006-09-04 01:46:26.000000000 +0200
@@ -85,6 +85,8 @@
#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
+#include <asm/irq.h>
+
#include "wd33c93.h"
@@ -1710,7 +1712,7 @@
static char setup_used[MAX_SETUP_ARGS];
static int done_setup = 0;
-int
+static int
wd33c93_setup(char *str)
{
int i;
--
VGER BF report: H 0.177864