summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c7xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/53c7xx.c')
-rw-r--r--drivers/scsi/53c7xx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c
index cfc9912..765769a 100644
--- a/drivers/scsi/53c7xx.c
+++ b/drivers/scsi/53c7xx.c
@@ -361,7 +361,7 @@ int CmdPageStart = (0 - Ent_dsa_zero - sizeof(struct NCR53c7x0_cmd)) & 0xff;
static char *setup_strings[] =
{"","","","","","","",""};
-#define MAX_SETUP_STRINGS (sizeof(setup_strings) / sizeof(char *))
+#define MAX_SETUP_STRINGS ARRAY_SIZE(setup_strings)
#define SETUP_BUFFER_SIZE 200
static char setup_buffer[SETUP_BUFFER_SIZE];
static char setup_used[MAX_SETUP_STRINGS];
@@ -2190,15 +2190,15 @@ static const struct {
*/
-static void
+static void
synchronous (struct Scsi_Host *host, int target, char *msg) {
struct NCR53c7x0_hostdata *hostdata = (struct NCR53c7x0_hostdata *)
host->hostdata[0];
int desire, divisor, i, limit;
unsigned char scntl3, sxfer;
/* The diagnostic message fits on one line, even with max. width integers */
- char buf[80];
-
+ char buf[80];
+
/* Desired transfer clock in Hz */
desire = 1000000000L / (msg[3] * 4);
/* Scale the available SCSI clock by 10 so we get tenths */
@@ -2209,14 +2209,14 @@ synchronous (struct Scsi_Host *host, int target, char *msg) {
msg[4] = 8;
if (hostdata->options & OPTION_DEBUG_SDTR)
- printk("scsi%d : optimal synchronous divisor of %d.%01d\n",
+ printk("scsi%d : optimal synchronous divisor of %d.%01d\n",
host->host_no, divisor / 10, divisor % 10);
- limit = (sizeof(syncs) / sizeof(syncs[0]) -1);
+ limit = ARRAY_SIZE(syncs) - 1;
for (i = 0; (i < limit) && (divisor > syncs[i].div); ++i);
if (hostdata->options & OPTION_DEBUG_SDTR)
- printk("scsi%d : selected synchronous divisor of %d.%01d\n",
+ printk("scsi%d : selected synchronous divisor of %d.%01d\n",
host->host_no, syncs[i].div / 10, syncs[i].div % 10);
msg[3] = ((1000000000L / hostdata->scsi_clock) * syncs[i].div / 10 / 4);
OpenPOWER on IntegriCloud