drivers/scsi/wd33c93.c: cleanups
PATCH 1/1 drivers/scsi/wd33c93.c: cleanups
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
drivers/scsi/wd33c93.c renamed from drivers/scsi/wd33c93.c.old +2 -1
@@ -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;
Quoted 3 lines · Adrian Bunk
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>
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Adrian Bunk
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
Signature · 4 lines
"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 SeedQuoted 1 line · Adrian Bunk
It sounds rather strange that non-arch code should use asm headers.
It should get everything it needs from including <linux/interrupt.h>
Quoted 10 lines · Adrian Bunk
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Adrian Bunk
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)Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 14 lines · Russell King
Quoted 10 lines · Adrian Bunk
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Adrian Bunk
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.
Quoted 15 lines
$ 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 -->
Quoted 1 line
Russell King
cu
Adrian
Signature · 4 lines
"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 SeedFrom: Adrian Bunk <[email protected]>
Date: Mon, 21 Aug 2006 21:22:15 +0200
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Adrian Bunk
Quoted 3 lines
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.
PATCH 1/1 drivers/scsi/wd33c93.c: cleanups
Quoted 16 lines · David Miller
From: Adrian Bunk <[email protected]>
Date: Mon, 21 Aug 2006 21:22:15 +0200Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · Adrian Bunk
Quoted 3 lines
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.
Quoted 7 lines
The
linux/irq.hhead should only be used on platforms that make use of the generic IRQ layer.
asm/irq.his 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
drivers/scsi/wd33c93.c renamed from drivers/scsi/wd33c93.c.old +3 -1
@@ -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;
Signature · 1 line
VGER BF report: H 0.177864