ncr5380: Remove pointless compiler command line override macros
authorFinn Thain <fthain@telegraphics.com.au>
Wed, 12 Nov 2014 05:12:00 +0000 (16:12 +1100)
committerChristoph Hellwig <hch@lst.de>
Thu, 20 Nov 2014 08:11:09 +0000 (09:11 +0100)
Compile-time override of scsi host defaults is pointless for drivers that
provide module parameters and __setup options for that. Too many macros make
the code hard to read so remove them.

Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Tested-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/atari_scsi.c
drivers/scsi/atari_scsi.h
drivers/scsi/mac_scsi.c
drivers/scsi/mac_scsi.h
drivers/scsi/sun3_scsi.c
drivers/scsi/sun3_scsi.h

index 1022a391c82a522e45886f12872fb6c4a3a1cb93..0e3a9cc40c949bc1701f601aedd54ce02f6c3756 100644 (file)
@@ -611,7 +611,7 @@ static int __init atari_scsi_detect(struct scsi_host_template *host)
 
 #ifdef SUPPORT_TAGS
        if (setup_use_tagged_queuing < 0)
-               setup_use_tagged_queuing = DEFAULT_USE_TAGGED_QUEUING;
+               setup_use_tagged_queuing = 0;
 #endif
 #ifdef REAL_DMA
        /* If running on a Falcon and if there's TT-Ram (i.e., more than one
index 24e854590dc45687b041d39b57cb09fd74b2b24d..41b7cd7d36b89d620ce9dddd466cba3ca50f9ceb 100644 (file)
@@ -36,9 +36,6 @@
 #define ATARI_FALCON_CMD_PER_LUN       1
 #define ATARI_FALCON_SG_TABLESIZE      SG_NONE
 
-#define        DEFAULT_USE_TAGGED_QUEUING      0
-
-
 #define        NCR5380_implementation_fields   /* none */
 
 #define NCR5380_read(reg)                atari_scsi_reg_read( reg )
index a27216d534ed487ff416a455bd02b35f7ed79029..f00c987478ecf4c3c4a1aa8fbfdd3b43d96aed90 100644 (file)
@@ -177,13 +177,12 @@ int __init macscsi_detect(struct scsi_host_template * tpnt)
     if (macintosh_config->scsi_type != MAC_SCSI_OLD)
        return( 0 );
 
-    /* setup variables */
-    tpnt->can_queue =
-       (setup_can_queue > 0) ? setup_can_queue : CAN_QUEUE;
-    tpnt->cmd_per_lun =
-       (setup_cmd_per_lun > 0) ? setup_cmd_per_lun : CMD_PER_LUN;
-    tpnt->sg_tablesize = 
-       (setup_sg_tablesize >= 0) ? setup_sg_tablesize : SG_TABLESIZE;
+       if (setup_can_queue > 0)
+               tpnt->can_queue = setup_can_queue;
+       if (setup_cmd_per_lun > 0)
+               tpnt->cmd_per_lun = setup_cmd_per_lun;
+       if (setup_sg_tablesize >= 0)
+               tpnt->sg_tablesize = setup_sg_tablesize;
 
     if (setup_hostid >= 0)
        tpnt->this_id = setup_hostid;
@@ -194,7 +193,7 @@ int __init macscsi_detect(struct scsi_host_template * tpnt)
 
 #ifdef SUPPORT_TAGS
     if (setup_use_tagged_queuing < 0)
-       setup_use_tagged_queuing = USE_TAGGED_QUEUING;
+       setup_use_tagged_queuing = 0;
 #endif
 
     /* Once we support multiple 5380s (e.g. DuoDock) we'll do
@@ -496,10 +495,10 @@ static struct scsi_host_template driver_template = {
        .queuecommand                   = macscsi_queue_command,
        .eh_abort_handler               = macscsi_abort,
        .eh_bus_reset_handler           = macscsi_bus_reset,
-       .can_queue                      = CAN_QUEUE,
+       .can_queue                      = 16,
        .this_id                        = 7,
        .sg_tablesize                   = SG_ALL,
-       .cmd_per_lun                    = CMD_PER_LUN,
+       .cmd_per_lun                    = 2,
        .use_clustering                 = DISABLE_CLUSTERING
 };
 
index 66b34dbdc0d06ede3b88a2ad578227440c9705ee..4eed4a75160b844ed896340fdc99dcff08e25109 100644 (file)
 
 #ifndef ASM
 
-#ifndef CMD_PER_LUN
-#define CMD_PER_LUN 2
-#endif
-
-#ifndef CAN_QUEUE
-#define CAN_QUEUE 16
-#endif
-
-#ifndef SG_TABLESIZE
-#define SG_TABLESIZE SG_NONE
-#endif
-
-#ifndef USE_TAGGED_QUEUING
-#define        USE_TAGGED_QUEUING 0
-#endif
-
 #include <scsi/scsicam.h>
 
 #define NCR5380_implementation_fields /* none */
index 9bae5f6122a792553462ac5748b95ac1a867aff2..12a991b19e5872cffe8abe0b85dc6fc7072180c0 100644 (file)
@@ -198,12 +198,12 @@ static int __init sun3scsi_detect(struct scsi_host_template *tpnt)
 #endif
 
        /* setup variables */
-       tpnt->can_queue =
-               (setup_can_queue > 0) ? setup_can_queue : CAN_QUEUE;
-       tpnt->cmd_per_lun =
-               (setup_cmd_per_lun > 0) ? setup_cmd_per_lun : CMD_PER_LUN;
-       tpnt->sg_tablesize = 
-               (setup_sg_tablesize >= 0) ? setup_sg_tablesize : SG_TABLESIZE;
+       if (setup_can_queue > 0)
+               tpnt->can_queue = setup_can_queue;
+       if (setup_cmd_per_lun > 0)
+               tpnt->cmd_per_lun = setup_cmd_per_lun;
+       if (setup_sg_tablesize >= 0)
+               tpnt->sg_tablesize = setup_sg_tablesize;
 
        if (setup_hostid >= 0)
                tpnt->this_id = setup_hostid;
@@ -257,7 +257,7 @@ static int __init sun3scsi_detect(struct scsi_host_template *tpnt)
 #endif
 #ifdef SUPPORT_TAGS
        if (setup_use_tagged_queuing < 0)
-               setup_use_tagged_queuing = USE_TAGGED_QUEUING;
+               setup_use_tagged_queuing = 1;
 #endif
 
        instance = scsi_register (tpnt, sizeof(struct NCR5380_hostdata));
@@ -683,10 +683,10 @@ static struct scsi_host_template driver_template = {
        .queuecommand           = sun3scsi_queue_command,
        .eh_abort_handler       = sun3scsi_abort,
        .eh_bus_reset_handler   = sun3scsi_bus_reset,
-       .can_queue              = CAN_QUEUE,
+       .can_queue              = 16,
        .this_id                = 7,
-       .sg_tablesize           = SG_TABLESIZE,
-       .cmd_per_lun            = CMD_PER_LUN,
+       .sg_tablesize           = SG_NONE,
+       .cmd_per_lun            = 2,
        .use_clustering         = DISABLE_CLUSTERING
 };
 
index 3b8a05ca3625f60edf7a1708a46e564d10738377..d616c9539cec7a589a4fe72804de720e1ddecfb7 100644 (file)
 
 #define IOBASE_SUN3_VMESCSI 0xff200000
 
-#ifndef CMD_PER_LUN
-#define CMD_PER_LUN 2
-#endif
-
-#ifndef CAN_QUEUE
-#define CAN_QUEUE 16
-#endif
-
-#ifndef SG_TABLESIZE
-#define SG_TABLESIZE SG_NONE
-#endif
-
-#ifndef MAX_TAGS
 #define MAX_TAGS 32
-#endif
-
-#ifndef USE_TAGGED_QUEUING
-#define        USE_TAGGED_QUEUING 1
-#endif
 
 #include <scsi/scsicam.h>