linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] drivers/scsi/wd33c93.c: cleanups
@ 2006-08-21 10:43 Adrian Bunk
  2006-08-21 10:53 ` Christoph Hellwig
  0 siblings, 1 reply; 9+ messages in thread
From: Adrian Bunk @ 2006-08-21 10:43 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, linux-kernel

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 <bunk@stusta.de>

--- 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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 10:43 [2.6 patch] drivers/scsi/wd33c93.c: cleanups Adrian Bunk
@ 2006-08-21 10:53 ` Christoph Hellwig
  2006-08-21 19:22   ` Adrian Bunk
  0 siblings, 1 reply; 9+ messages in thread
From: Christoph Hellwig @ 2006-08-21 10:53 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: James.Bottomley, linux-scsi, linux-kernel

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>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 10:53 ` Christoph Hellwig
@ 2006-08-21 19:22   ` Adrian Bunk
  2006-08-21 19:24     ` Matthew Wilcox
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Adrian Bunk @ 2006-08-21 19:22 UTC (permalink / raw)
  To: Christoph Hellwig, James.Bottomley, linux-scsi, linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 19:22   ` Adrian Bunk
@ 2006-08-21 19:24     ` Matthew Wilcox
  2006-08-21 19:25     ` Russell King
  2006-08-21 19:31     ` David Miller
  2 siblings, 0 replies; 9+ messages in thread
From: Matthew Wilcox @ 2006-08-21 19:24 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Christoph Hellwig, James.Bottomley, linux-scsi, linux-kernel

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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 19:22   ` Adrian Bunk
  2006-08-21 19:24     ` Matthew Wilcox
@ 2006-08-21 19:25     ` Russell King
  2006-08-21 20:41       ` Adrian Bunk
  2006-08-21 19:31     ` David Miller
  2 siblings, 1 reply; 9+ messages in thread
From: Russell King @ 2006-08-21 19:25 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Christoph Hellwig, James.Bottomley, linux-scsi, linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 19:22   ` Adrian Bunk
  2006-08-21 19:24     ` Matthew Wilcox
  2006-08-21 19:25     ` Russell King
@ 2006-08-21 19:31     ` David Miller
  2006-09-04 11:41       ` Adrian Bunk
  2 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2006-08-21 19:31 UTC (permalink / raw)
  To: bunk; +Cc: hch, James.Bottomley, linux-scsi, linux-kernel

From: Adrian Bunk <bunk@stusta.de>
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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 19:25     ` Russell King
@ 2006-08-21 20:41       ` Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2006-08-21 20:41 UTC (permalink / raw)
  To: Christoph Hellwig, James.Bottomley, linux-scsi, linux-kernel

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] drivers/scsi/wd33c93.c: cleanups
  2006-08-21 19:31     ` David Miller
@ 2006-09-04 11:41       ` Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2006-09-04 11:41 UTC (permalink / raw)
  To: David Miller; +Cc: hch, James.Bottomley, linux-scsi, linux-kernel

On Mon, Aug 21, 2006 at 12:31:42PM -0700, David Miller wrote:
> From: Adrian Bunk <bunk@stusta.de>
> 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 <bunk@stusta.de>

--- 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [2.6 patch] drivers/scsi/wd33c93.c: cleanups
@ 2006-12-02 17:54 Adrian Bunk
  0 siblings, 0 replies; 9+ messages in thread
From: Adrian Bunk @ 2006-12-02 17:54 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-scsi, linux-kernel

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 <bunk@stusta.de>

---

This patch was already sent on:
- 4 Sep 2006

--- 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;



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-12-02 17:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-21 10:43 [2.6 patch] drivers/scsi/wd33c93.c: cleanups Adrian Bunk
2006-08-21 10:53 ` Christoph Hellwig
2006-08-21 19:22   ` Adrian Bunk
2006-08-21 19:24     ` Matthew Wilcox
2006-08-21 19:25     ` Russell King
2006-08-21 20:41       ` Adrian Bunk
2006-08-21 19:31     ` David Miller
2006-09-04 11:41       ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2006-12-02 17:54 Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).