public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* M68k SCSI compile warning fixes
@ 2011-06-13 18:39 Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 1/8] scsi/atari: Provide a dummy NCR5380_exit() Geert Uytterhoeven
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: linux-scsi, linux-m68k, linux-kernel

	Hi James,

These patches fix several compile warnings on m68k.
As I don't have the hardware, I couldn't run test them, though.

 b/drivers/scsi/atari_NCR5380.c |    5 +++
 b/drivers/scsi/atari_scsi.c    |    1 
 b/drivers/scsi/mac_scsi.c      |    2 -
 b/drivers/scsi/sun3_NCR5380.c  |    2 -
 b/drivers/scsi/sun3_scsi.c     |    2 -
 b/drivers/scsi/sun3_scsi_vme.c |    2 -
 drivers/scsi/mac_scsi.c        |   12 -------
 drivers/scsi/sun3_NCR5380.c    |   65 +++--------------------------------------
 drivers/scsi/sun3_scsi.c       |    9 ++++-
 drivers/scsi/sun3_scsi_vme.c   |    9 ++++-
 10 files changed, 31 insertions(+), 78 deletions(-)

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* [PATCH 1/8] scsi/atari: Provide a dummy NCR5380_exit()
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 2/8] scsi/mac: macscsi_detect() should be __init Geert Uytterhoeven
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Michael Schmitz

and call it from atari_scsi_release(), cfr. the other NCR5380 drivers.

This fixes:

drivers/scsi/NCR5380.h:303: warning: ‘NCR5380_exit’ declared ‘static’ but never defined

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
---
 drivers/scsi/atari_NCR5380.c |    5 +++++
 drivers/scsi/atari_scsi.c    |    1 +
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index 24652f1..2db79b4 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -892,6 +892,11 @@ static int __init NCR5380_init(struct Scsi_Host *instance, int flags)
 	return 0;
 }
 
+static void NCR5380_exit(struct Scsi_Host *instance)
+{
+	/* Empty, as we didn't schedule any delayed work */
+}
+
 /*
  * Function : int NCR5380_queue_command (Scsi_Cmnd *cmd,
  *	void (*done)(Scsi_Cmnd *))
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index 3e8658e..04a154f 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -730,6 +730,7 @@ int atari_scsi_release(struct Scsi_Host *sh)
 		free_irq(IRQ_TT_MFP_SCSI, sh);
 	if (atari_dma_buffer)
 		atari_stram_free(atari_dma_buffer);
+	NCR5380_exit(sh);
 	return 1;
 }
 
-- 
1.7.0.4

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

* [PATCH 2/8] scsi/mac: macscsi_detect() should be __init
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 1/8] scsi/atari: Provide a dummy NCR5380_exit() Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 3/8] scsi/mac: Remove unused variable default_instance Geert Uytterhoeven
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Finn Thain

WARNING: vmlinux.o(.text+0x1ecd3e): Section mismatch in reference from the function macscsi_detect() to the function .devinit.text:NCR5380_init()
WARNING: vmlinux.o(.text+0x1ecddc): Section mismatch in reference from the function macscsi_detect() to the function .init.text:NCR5380_print_options()
WARNING: vmlinux.o(.text+0x1ece60): Section mismatch in reference from the function macscsi_detect() to the function .init.text:NCR5380_print_options()

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/scsi/mac_scsi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index bf2a1c5..67eb758 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -233,7 +233,7 @@ static struct Scsi_Host *default_instance;
  *
  */
  
-int macscsi_detect(struct scsi_host_template * tpnt)
+int __init macscsi_detect(struct scsi_host_template * tpnt)
 {
     static int called = 0;
     int flags = 0;
-- 
1.7.0.4

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

* [PATCH 3/8] scsi/mac: Remove unused variable default_instance
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 1/8] scsi/atari: Provide a dummy NCR5380_exit() Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 2/8] scsi/mac: macscsi_detect() should be __init Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 4/8] scsi/sun3: sun3scsi_detect() and NCR5380_init() should be __init Geert Uytterhoeven
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Finn Thain

This fixes:

drivers/scsi/mac_scsi.c:220:5: warning: "NDEBUG_ABORT" is not defined
drivers/scsi/mac_scsi.c:271:5: warning: "NDEBUG_ABORT" is not defined

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/scsi/mac_scsi.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index 67eb758..af3a6af 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -215,13 +215,6 @@ static int __init mac_scsi_setup(char *str) {
 __setup("mac5380=", mac_scsi_setup);
 
 /*
- * If you want to find the instance with (k)gdb ...
- */
-#if NDEBUG
-static struct Scsi_Host *default_instance;
-#endif
-
-/*
  * Function : int macscsi_detect(struct scsi_host_template * tpnt)
  *
  * Purpose : initializes mac NCR5380 driver based on the
@@ -268,10 +261,7 @@ int __init macscsi_detect(struct scsi_host_template * tpnt)
     /* Once we support multiple 5380s (e.g. DuoDock) we'll do
        something different here */
     instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
-#if NDEBUG
-    default_instance = instance;
-#endif
-    
+
     if (macintosh_config->ident == MAC_MODEL_IIFX) {
 	mac_scsi_regp  = via1+0x8000;
 	mac_scsi_drq   = via1+0xE000;
-- 
1.7.0.4

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

* [PATCH 4/8] scsi/sun3: sun3scsi_detect() and NCR5380_init() should be __init
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
                   ` (2 preceding siblings ...)
  2011-06-13 18:39 ` [PATCH 3/8] scsi/mac: Remove unused variable default_instance Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 5/8] scsi/sun3: Provide a dummy NCR5380_exit() Geert Uytterhoeven
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Sam Creasey

WARNING: vmlinux.o(.text+0x18545c): Section mismatch in reference from the function sun3scsi_detect() to the function .init.text:NCR5380_print_options()
WARNING: vmlinux.o(.text+0x18556c): Section mismatch in reference from the function sun3scsi_detect() to the function .init.text:NCR5380_print_options()
WARNING: vmlinux.o(.text+0x187692): Section mismatch in reference from the function sun3scsi_detect() to the function .init.text:NCR5380_print_options()
WARNING: vmlinux.o(.text+0x187770): Section mismatch in reference from the function sun3scsi_detect() to the function .init.text:NCR5380_print_options()

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
 drivers/scsi/sun3_NCR5380.c  |    2 +-
 drivers/scsi/sun3_scsi.c     |    2 +-
 drivers/scsi/sun3_scsi_vme.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 29c8246..0d04c3a 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -842,7 +842,7 @@ static char *lprint_Scsi_Cmnd(struct scsi_cmnd *cmd, char *pos, char *buffer,
  * 
  */
 
-static int NCR5380_init (struct Scsi_Host *instance, int flags)
+static int __init NCR5380_init(struct Scsi_Host *instance, int flags)
 {
     int i;
     SETUP_HOSTDATA(instance);
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index 613f588..2ad6b91 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -195,7 +195,7 @@ static struct Scsi_Host *default_instance;
  *
  */
  
-int sun3scsi_detect(struct scsi_host_template * tpnt)
+int __init sun3scsi_detect(struct scsi_host_template * tpnt)
 {
 	unsigned long ioaddr;
 	static int called = 0;
diff --git a/drivers/scsi/sun3_scsi_vme.c b/drivers/scsi/sun3_scsi_vme.c
index 7c526b8..cd6d779 100644
--- a/drivers/scsi/sun3_scsi_vme.c
+++ b/drivers/scsi/sun3_scsi_vme.c
@@ -137,7 +137,7 @@ static struct Scsi_Host *default_instance;
  *
  */
  
-static int sun3scsi_detect(struct scsi_host_template * tpnt)
+static int __init sun3scsi_detect(struct scsi_host_template * tpnt)
 {
 	unsigned long ioaddr, irq = 0;
 	static int called = 0;
-- 
1.7.0.4


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

* [PATCH 5/8] scsi/sun3: Provide a dummy NCR5380_exit()
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
                   ` (3 preceding siblings ...)
  2011-06-13 18:39 ` [PATCH 4/8] scsi/sun3: sun3scsi_detect() and NCR5380_init() should be __init Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 6/8] scsi/sun3: Check for NCR_TIMEOUT being defined instead of having a value Geert Uytterhoeven
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Sam Creasey

and call it from sun3scsi_release(), cfr. the other NCR5380 drivers.

This fixes:

drivers/scsi/NCR5380.h:303: warning: ‘NCR5380_exit’ declared ‘static’ but never defined

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
 drivers/scsi/sun3_NCR5380.c  |    5 +++++
 drivers/scsi/sun3_scsi.c     |    1 +
 drivers/scsi/sun3_scsi_vme.c |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 0d04c3a..2ba1cb7 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -890,6 +890,11 @@ static int __init NCR5380_init(struct Scsi_Host *instance, int flags)
     return 0;
 }
 
+static void NCR5380_exit(struct Scsi_Host *instance)
+{
+	/* Empty, as we didn't schedule any delayed work */
+}
+
 /* 
  * Function : int NCR5380_queue_command (struct scsi_cmnd *cmd,
  *	void (*done)(struct scsi_cmnd *))
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index 2ad6b91..2cc83ef 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -314,6 +314,7 @@ int sun3scsi_release (struct Scsi_Host *shpnt)
 
 	iounmap((void *)sun3_scsi_regp);
 
+	NCR5380_exit(shpnt);
 	return 0;
 }
 
diff --git a/drivers/scsi/sun3_scsi_vme.c b/drivers/scsi/sun3_scsi_vme.c
index cd6d779..c0252db 100644
--- a/drivers/scsi/sun3_scsi_vme.c
+++ b/drivers/scsi/sun3_scsi_vme.c
@@ -283,6 +283,7 @@ int sun3scsi_release (struct Scsi_Host *shpnt)
 
 	iounmap((void *)sun3_scsi_regp);
 
+	NCR5380_exit(shpnt);
 	return 0;
 }
 
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 6/8] scsi/sun3: Check for NCR_TIMEOUT being defined instead of having a value
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
                   ` (4 preceding siblings ...)
  2011-06-13 18:39 ` [PATCH 5/8] scsi/sun3: Provide a dummy NCR5380_exit() Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 7/8] scsi/sun3: Add various missing NDEBUG* definitions Geert Uytterhoeven
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Sam Creasey

This fixes:

drivers/scsi/sun3_NCR5380.c:1448:5: warning: "NCR_TIMEOUT" is not defined

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
 drivers/scsi/sun3_NCR5380.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 2ba1cb7..f3cffdf 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -1445,7 +1445,7 @@ static int NCR5380_select(struct Scsi_Host *instance, struct scsi_cmnd *cmd,
     local_irq_restore(flags);
 
     /* Wait for arbitration logic to complete */
-#if NCR_TIMEOUT
+#ifdef NCR_TIMEOUT
     {
       unsigned long timeout = jiffies + 2*NCR_TIMEOUT;
 
-- 
1.7.0.4

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

* [PATCH 7/8] scsi/sun3: Add various missing NDEBUG* definitions
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
                   ` (5 preceding siblings ...)
  2011-06-13 18:39 ` [PATCH 6/8] scsi/sun3: Check for NCR_TIMEOUT being defined instead of having a value Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:39 ` [PATCH 8/8] scsi/sun3: Remove commented out merge_contiguous_buffers Geert Uytterhoeven
  2011-06-13 18:41 ` [PATCH 0/8] M68k SCSI compile warning fixes Geert Uytterhoeven
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Sam Creasey

This fixes a.o.:

drivers/scsi/sun3_scsi.h:225:5: warning: "NDEBUG" is not defined
drivers/scsi/sun3_scsi.h:345:14: warning: "NDEBUG_ABORT" is not defined
drivers/scsi/sun3_scsi.h:351:14: warning: "NDEBUG_TAGS" is not defined
drivers/scsi/sun3_scsi.h:357:14: warning: "NDEBUG_MERGING" is not defined

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
 drivers/scsi/sun3_scsi.c     |    8 ++++++--
 drivers/scsi/sun3_scsi_vme.c |    8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index 2cc83ef..baf7328 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -70,6 +70,12 @@
 #include <asm/idprom.h>
 #include <asm/machines.h>
 
+#define NDEBUG 0
+
+#define NDEBUG_ABORT		0x00100000
+#define NDEBUG_TAGS		0x00200000
+#define NDEBUG_MERGING		0x00400000
+
 /* dma on! */
 #define REAL_DMA
 
@@ -86,8 +92,6 @@ static void NCR5380_print(struct Scsi_Host *instance);
 /*#define RESET_BOOT */
 #define DRIVER_SETUP
 
-#define NDEBUG 0
-
 /*
  * BUG can be used to trigger a strange code-size related hang on 2.1 kernels
  */
diff --git a/drivers/scsi/sun3_scsi_vme.c b/drivers/scsi/sun3_scsi_vme.c
index c0252db..fbba78e 100644
--- a/drivers/scsi/sun3_scsi_vme.c
+++ b/drivers/scsi/sun3_scsi_vme.c
@@ -39,6 +39,12 @@
 /* dma on! */
 #define REAL_DMA
 
+#define NDEBUG 0
+
+#define NDEBUG_ABORT		0x00100000
+#define NDEBUG_TAGS		0x00200000
+#define NDEBUG_MERGING		0x00400000
+
 #include "scsi.h"
 #include "initio.h"
 #include <scsi/scsi_host.h>
@@ -50,8 +56,6 @@ extern int sun3_map_test(unsigned long, char *);
 /*#define RESET_BOOT */
 #define DRIVER_SETUP
 
-#define NDEBUG 0
-
 /*
  * BUG can be used to trigger a strange code-size related hang on 2.1 kernels
  */
-- 
1.7.0.4


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

* [PATCH 8/8] scsi/sun3: Remove commented out merge_contiguous_buffers
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
                   ` (6 preceding siblings ...)
  2011-06-13 18:39 ` [PATCH 7/8] scsi/sun3: Add various missing NDEBUG* definitions Geert Uytterhoeven
@ 2011-06-13 18:39 ` Geert Uytterhoeven
  2011-06-13 18:41 ` [PATCH 0/8] M68k SCSI compile warning fixes Geert Uytterhoeven
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:39 UTC (permalink / raw)
  To: James E.J. Bottomley
  Cc: linux-scsi, linux-m68k, linux-kernel, Geert Uytterhoeven,
	Sam Creasey

This fixes:

drivers/scsi/sun3_NCR5380.c:475: warning: ‘merge_contiguous_buffers’ defined but not used

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
---
 drivers/scsi/sun3_NCR5380.c |   58 -------------------------------------------
 1 files changed, 0 insertions(+), 58 deletions(-)

diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index f3cffdf..7e12a2e 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -49,13 +49,6 @@
  *    inside the execution of NCR5380_intr(), leading to recursive
  *    calls.
  *
- *  - I've added a function merge_contiguous_buffers() that tries to
- *    merge scatter-gather buffers that are located at contiguous
- *    physical addresses and can be processed with the same DMA setup.
- *    Since most scatter-gather operations work on a page (4K) of
- *    4 buffers (1K), in more than 90% of all cases three interrupts and
- *    DMA setup actions are saved.
- *
  * - I've deleted all the stuff for AUTOPROBE_IRQ, REAL_DMA_POLL, PSEUDO_DMA
  *    and USLEEP, because these were messing up readability and will never be
  *    needed for Atari SCSI.
@@ -460,47 +453,6 @@ static void free_all_tags( void )
 
 
 /*
- * Function: void merge_contiguous_buffers(struct scsi_cmnd *cmd)
- *
- * Purpose: Try to merge several scatter-gather requests into one DMA
- *    transfer. This is possible if the scatter buffers lie on
- *    physical contiguous addresses.
- *
- * Parameters: struct scsi_cmnd *cmd
- *    The command to work on. The first scatter buffer's data are
- *    assumed to be already transferred into ptr/this_residual.
- */
-
-static void merge_contiguous_buffers(struct scsi_cmnd *cmd)
-{
-    unsigned long endaddr;
-#if (NDEBUG & NDEBUG_MERGING)
-    unsigned long oldlen = cmd->SCp.this_residual;
-    int		  cnt = 1;
-#endif
-
-    for (endaddr = virt_to_phys(cmd->SCp.ptr + cmd->SCp.this_residual - 1) + 1;
-	 cmd->SCp.buffers_residual &&
-	 virt_to_phys(SGADDR(&(cmd->SCp.buffer[1]))) == endaddr; ) {
-	
-	MER_PRINTK("VTOP(%p) == %08lx -> merging\n",
-		   SGADDR(&(cmd->SCp.buffer[1])), endaddr);
-#if (NDEBUG & NDEBUG_MERGING)
-	++cnt;
-#endif
-	++cmd->SCp.buffer;
-	--cmd->SCp.buffers_residual;
-	cmd->SCp.this_residual += cmd->SCp.buffer->length;
-	endaddr += cmd->SCp.buffer->length;
-    }
-#if (NDEBUG & NDEBUG_MERGING)
-    if (oldlen != cmd->SCp.this_residual)
-	MER_PRINTK("merged %d buffers from %p, new length %08x\n",
-		   cnt, cmd->SCp.ptr, cmd->SCp.this_residual);
-#endif
-}
-
-/*
  * Function : void initialize_SCp(struct scsi_cmnd *cmd)
  *
  * Purpose : initialize the saved data pointers for cmd to point to the 
@@ -521,11 +473,6 @@ static __inline__ void initialize_SCp(struct scsi_cmnd *cmd)
 	cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1;
 	cmd->SCp.ptr = (char *) SGADDR(cmd->SCp.buffer);
 	cmd->SCp.this_residual = cmd->SCp.buffer->length;
-
-	/* ++roman: Try to merge some scatter-buffers if they are at
-	 * contiguous physical addresses.
-	 */
-//	merge_contiguous_buffers( cmd );
     } else {
 	cmd->SCp.buffer = NULL;
 	cmd->SCp.buffers_residual = 0;
@@ -2076,11 +2023,6 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
 		    --cmd->SCp.buffers_residual;
 		    cmd->SCp.this_residual = cmd->SCp.buffer->length;
 		    cmd->SCp.ptr = SGADDR(cmd->SCp.buffer);
-
-		    /* ++roman: Try to merge some scatter-buffers if
-		     * they are at contiguous physical addresses.
-		     */
-//		    merge_contiguous_buffers( cmd );
 		    INF_PRINTK("scsi%d: %d bytes and %d buffers left\n",
 			       HOSTNO, cmd->SCp.this_residual,
 			       cmd->SCp.buffers_residual);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 0/8] M68k SCSI compile warning fixes
  2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
                   ` (7 preceding siblings ...)
  2011-06-13 18:39 ` [PATCH 8/8] scsi/sun3: Remove commented out merge_contiguous_buffers Geert Uytterhoeven
@ 2011-06-13 18:41 ` Geert Uytterhoeven
  8 siblings, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2011-06-13 18:41 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: linux-scsi, linux-m68k, linux-kernel

[corrected the subject]

       Hi James,

These patches fix several compile warnings on m68k.
As I don't have the hardware, I couldn't run test them, though.

 b/drivers/scsi/atari_NCR5380.c |    5 +++
 b/drivers/scsi/atari_scsi.c    |    1
 b/drivers/scsi/mac_scsi.c      |    2 -
 b/drivers/scsi/sun3_NCR5380.c  |    2 -
 b/drivers/scsi/sun3_scsi.c     |    2 -
 b/drivers/scsi/sun3_scsi_vme.c |    2 -
 drivers/scsi/mac_scsi.c        |   12 -------
 drivers/scsi/sun3_NCR5380.c    |   65 +++--------------------------------------
 drivers/scsi/sun3_scsi.c       |    9 ++++-
 drivers/scsi/sun3_scsi_vme.c   |    9 ++++-
 10 files changed, 31 insertions(+), 78 deletions(-)

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

end of thread, other threads:[~2011-06-13 18:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-13 18:39 M68k SCSI compile warning fixes Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 1/8] scsi/atari: Provide a dummy NCR5380_exit() Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 2/8] scsi/mac: macscsi_detect() should be __init Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 3/8] scsi/mac: Remove unused variable default_instance Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 4/8] scsi/sun3: sun3scsi_detect() and NCR5380_init() should be __init Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 5/8] scsi/sun3: Provide a dummy NCR5380_exit() Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 6/8] scsi/sun3: Check for NCR_TIMEOUT being defined instead of having a value Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 7/8] scsi/sun3: Add various missing NDEBUG* definitions Geert Uytterhoeven
2011-06-13 18:39 ` [PATCH 8/8] scsi/sun3: Remove commented out merge_contiguous_buffers Geert Uytterhoeven
2011-06-13 18:41 ` [PATCH 0/8] M68k SCSI compile warning fixes Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox