[PATCH v3 07/48] scsi: NCR5380: Remove the NCR5380_CMD_SIZE macro

Bart Van Assche
2022-02-11T22:33:22Z

This makes it easier to find users of the NCR5380_cmd data structure with
'grep'.

Cc: Finn Thain <fthain@telegraphics.com.au>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Ondrej Zary <linux@rainbow-software.org>
Cc: Michael Schmitz <schmitzmic@gmail.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Acked-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/NCR5380.h | 2 --
drivers/scsi/arm/cumana_1.c | 2 +-
drivers/scsi/arm/oak.c | 2 +-
drivers/scsi/atari_scsi.c | 2 +-
drivers/scsi/dmx3191d.c | 2 +-
drivers/scsi/g_NCR5380.c | 2 +-
drivers/scsi/mac_scsi.c | 2 +-
drivers/scsi/sun3_scsi.c | 2 +-
8 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index 8a3b41932288..845bd2423e66 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -230,8 +230,6 @@ struct NCR5380_cmd {
struct list_head list;
};

-#define NCR5380_CMD_SIZE (sizeof(struct NCR5380_cmd))
-
#define NCR5380_PIO_CHUNK_SIZE 256

/* Time limit (ms) to poll registers when IRQs are disabled, e.g. during PDMA */
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c
index 3fd944374631..5d4f67ba74c0 100644
--- a/drivers/scsi/arm/cumana_1.c
+++ b/drivers/scsi/arm/cumana_1.c
@@ -223,7 +223,7 @@ static struct scsi_host_template cumanascsi_template = {
.sg_tablesize = SG_ALL,
.cmd_per_lun = 2,
.proc_name = "CumanaSCSI-1",
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
.max_sectors = 128,
.dma_boundary = PAGE_SIZE - 1,
};
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c
index 78f33d57c3e8..f18a0620c808 100644
--- a/drivers/scsi/arm/oak.c
+++ b/drivers/scsi/arm/oak.c
@@ -113,7 +113,7 @@ static struct scsi_host_template oakscsi_template = {
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
.proc_name = "oakscsi",
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
.max_sectors = 128,
};

diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index 95d7a3586083..e9d0d99abc86 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -711,7 +711,7 @@ static struct scsi_host_template atari_scsi_template = {
.this_id = 7,
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
};

static int __init atari_scsi_probe(struct platform_device *pdev)
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c
index 6df60b31ecb0..a171ce6b70b2 100644
--- a/drivers/scsi/dmx3191d.c
+++ b/drivers/scsi/dmx3191d.c
@@ -52,7 +52,7 @@ static struct scsi_host_template dmx3191d_driver_template = {
.sg_tablesize = SG_ALL,
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
};

static int dmx3191d_probe_one(struct pci_dev *pdev,
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 7ba3c9312731..5923f86a384e 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -702,7 +702,7 @@ static struct scsi_host_template driver_template = {
.sg_tablesize = SG_ALL,
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
.max_sectors = 128,
};

diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c
index 5c808fbc6ce2..71d493a0bb43 100644
--- a/drivers/scsi/mac_scsi.c
+++ b/drivers/scsi/mac_scsi.c
@@ -434,7 +434,7 @@ static struct scsi_host_template mac_scsi_template = {
.sg_tablesize = 1,
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
.max_sectors = 128,
};

diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c
index f7f724a3ff1d..82a253270c3b 100644
--- a/drivers/scsi/sun3_scsi.c
+++ b/drivers/scsi/sun3_scsi.c
@@ -505,7 +505,7 @@ static struct scsi_host_template sun3_scsi_template = {
.sg_tablesize = 1,
.cmd_per_lun = 2,
.dma_boundary = PAGE_SIZE - 1,
- .cmd_size = NCR5380_CMD_SIZE,
+ .cmd_size = sizeof(struct NCR5380_cmd),
};

static int __init sun3_scsi_probe(struct platform_device *pdev)