Skip to contentSkip to conversation

SCSI NCR53C9x.c: some cleanups

PATCH Geert Uytterhoeven 2 participants 4 messages Jan 17, 2005 1 message not in the archive SCSI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · Linux Kernel Mailing List

ChangeSet 1.2034.61.36, 2004/12/21 09:41:18-06:00, [email protected]

[PATCH] SCSI NCR53C9x.c: some cleanups

Make two functions static

drivers/scsi/NCR53C9x.c line 511

Quoted 8 lines
drivers/scsi/NCR53C9x.c +1 -1
@@ -505,7 +505,7 @@
 }
 
 /* This places the ESP into a known state at boot time. */
-void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
+static void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
 {
 	volatile unchar trash;
 

This change breaks the Amiga Oktagon SCSI driver (drivers/scsi/oktagon_esp.c), which calls esp_bootup_reset().

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 12 lines · Geert Uytterhoeven
Quoted 11 lines · Linux Kernel Mailing List

ChangeSet 1.2034.61.36, 2004/12/21 09:41:18-06:00, [email protected]

[PATCH] SCSI NCR53C9x.c: some cleanups

Make two functions static

drivers/scsi/NCR53C9x.c +0 -0
@@ -505,7 +505,7 @@
 }
 
Quoted 9 lines

drivers/scsi/NCR53C9x.c line 511

Quoted 6 lines
drivers/scsi/NCR53C9x.c +1 -1
 /* This places the ESP into a known state at boot time. */
-void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
+static void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
 {
 	volatile unchar trash;
 

This change breaks the Amiga Oktagon SCSI driver (drivers/scsi/oktagon_esp.c), which calls esp_bootup_reset().

My bad - I did grep for esp_bootup_reset, but I confused the function prototype in oktagon_esp.c with a local function in this file.

@Linus:
Please exclude my buggy patch.

Quoted 3 lines

Gr{oetje,eeting}s,

Geert

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 Seed
#3 lore raw
Quoted 23 lines · Adrian Bunk
Quoted 12 lines · Geert Uytterhoeven
Quoted 11 lines · Linux Kernel Mailing List

ChangeSet 1.2034.61.36, 2004/12/21 09:41:18-06:00, [email protected]

[PATCH] SCSI NCR53C9x.c: some cleanups

Make two functions static

drivers/scsi/NCR53C9x.c +0 -0
@@ -505,7 +505,7 @@
 }
 
Quoted 9 lines

drivers/scsi/NCR53C9x.c line 511

Quoted 6 lines
drivers/scsi/NCR53C9x.c +1 -1
 /* This places the ESP into a known state at boot time. */
-void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
+static void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
 {
 	volatile unchar trash;
 

This change breaks the Amiga Oktagon SCSI driver (drivers/scsi/oktagon_esp.c), which calls esp_bootup_reset().

Quoted 5 lines

My bad - I did grep for esp_bootup_reset, but I confused the function prototype in oktagon_esp.c with a local function in this file.

@Linus:
Please exclude my buggy patch.

Or better: I'll move the prototype to drivers/scsi/NCR53C9x.h.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw
Quoted 24 lines · Geert Uytterhoeven
Quoted 23 lines · Adrian Bunk
Quoted 21 lines · Geert Uytterhoeven
Quoted 9 lines · Linux Kernel Mailing List

ChangeSet 1.2034.61.36, 2004/12/21 09:41:18-06:00, [email protected]

[PATCH] SCSI NCR53C9x.c: some cleanups

Make two functions static

drivers/scsi/NCR53C9x.c line 511

Quoted 8 lines
drivers/scsi/NCR53C9x.c +1 -1
@@ -505,7 +505,7 @@
 }
 
 /* This places the ESP into a known state at boot time. */
-void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
+static void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
 {
 	volatile unchar trash;
 

This change breaks the Amiga Oktagon SCSI driver (drivers/scsi/oktagon_esp.c), which calls esp_bootup_reset().

Quoted 7 lines
Quoted 5 lines

My bad - I did grep for esp_bootup_reset, but I confused the function prototype in oktagon_esp.c with a local function in this file.

@Linus:
Please exclude my buggy patch.

Or better: I'll move the prototype to drivers/scsi/NCR53C9x.h.

So here it is. I also stumbled upon esp_cmd(), which is a macro in the common (non-debug) case and definitily not meant to be global.

Changelog:
- Make esp_bootup_reset() global again, since the Amiga Oktagon SCSI driver needs it, and move its prototype from oktagon_esp.c to NCR53C9x.h
- Make esp_cmd() static in the debug case. It's already a local macro in the non-debug case.

drivers/scsi/NCR53C9x.c +2 -2
@@ -290,7 +290,7 @@
 #endif
 
 #ifdef DEBUG_ESP_CMDS
-inline void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs,
+static inline void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs,
 			   unchar cmd)
 {
 	esp->espcmdlog[esp->espcmdent] = cmd;
@@ -505,7 +505,7 @@
 }
 
 /* This places the ESP into a known state at boot time. */
-static void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
+void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs)
 {
 	volatile unchar trash;
 
drivers/scsi/NCR53C9x.h +1 -1
@@ -652,7 +652,7 @@
 
 
 /* External functions */
-extern void esp_cmd(struct NCR_ESP *esp, struct ESP_regs *eregs, unchar cmd);
+extern void esp_bootup_reset(struct NCR_ESP *esp, struct ESP_regs *eregs);
 extern struct NCR_ESP *esp_allocate(Scsi_Host_Template *, void *);
 extern void esp_deallocate(struct NCR_ESP *);
 extern void esp_release(void);
drivers/scsi/oktagon_esp.c +0 -2
@@ -72,8 +72,6 @@
 static void dma_advance_sg(Scsi_Cmnd *);
 static int  oktagon_notify_reboot(struct notifier_block *this, unsigned long code, void *x);
 
-void esp_bootup_reset(struct NCR_ESP *esp,struct ESP_regs *eregs);
-
 #ifdef USE_BOTTOM_HALF
 static void dma_commit(void *opaque);
 

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds