Commit 39c743c3 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Linus Torvalds

[PATCH] scsi cleanups

  o scsi/imm.h: use c99 style initialization

  As far as I verified this also fixes a bug when doing the
  table lookup for IMM_EPP_32, that would result in "Unknown"
  as IMM_EPP_32 is equal to 6 and there is the #ifdef...

ChangeSet@1.1386, 2003-09-02 00:11:07-03:00, acme@allegro.kerneljanitors.org
  o scsi/*.h: remove not needed #define NULL

ChangeSet@1.1385, 2003-09-02 00:05:16-03:00, acme@allegro.kerneljanitors.org
  o scsi/3w-xxx.h: use c99 style init
parent 5bff44fc
......@@ -59,42 +59,37 @@
/* AEN strings */
static char *tw_aen_string[] = {
"INFO: AEN queue empty", // 0x000
"INFO: Soft reset occurred", // 0x001
"ERROR: Unit degraded: Unit #", // 0x002
"ERROR: Controller error", // 0x003
"ERROR: Rebuild failed: Unit #", // 0x004
"INFO: Rebuild complete: Unit #", // 0x005
"ERROR: Incomplete unit detected: Unit #", // 0x006
"INFO: Initialization complete: Unit #", // 0x007
"WARNING: Unclean shutdown detected: Unit #", // 0x008
"WARNING: ATA port timeout: Port #", // 0x009
"ERROR: Drive error: Port #", // 0x00A
"INFO: Rebuild started: Unit #", // 0x00B
"INFO: Initialization started: Unit #", // 0x00C
"ERROR: Logical unit deleted: Unit #", // 0x00D
NULL, // 0x00E unused
"WARNING: SMART threshold exceeded: Port #", // 0x00F
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL,
NULL, NULL, // 0x010-0x020 unused
"WARNING: ATA UDMA downgrade: Port #", // 0x021
"WARNING: ATA UDMA upgrade: Port #", // 0x022
"WARNING: Sector repair occurred: Port #", // 0x023
"ERROR: SBUF integrity check failure", // 0x024
"ERROR: Lost cached write: Port #", // 0x025
"ERROR: Drive ECC error detected: Port #", // 0x026
"ERROR: DCB checksum error: Port #", // 0x027
"ERROR: DCB unsupported version: Port #", // 0x028
"INFO: Verify started: Unit #", // 0x029
"ERROR: Verify failed: Port #", // 0x02A
"INFO: Verify complete: Unit #", // 0x02B
"WARNING: Overwrote bad sector during rebuild: Port #", //0x02C
"ERROR: Encountered bad sector during rebuild: Port #", //0x02D
"ERROR: Replacement drive is too small: Port #", //0x02E
"WARNING: Verify error: Unit not previously initialized: Unit #", //0x02F
"ERROR: Drive not supported: Port #" // 0x030
[0x000] = "INFO: AEN queue empty",
[0x001] = "INFO: Soft reset occurred",
[0x002] = "ERROR: Unit degraded: Unit #",
[0x003] = "ERROR: Controller error",
[0x004] = "ERROR: Rebuild failed: Unit #",
[0x005] = "INFO: Rebuild complete: Unit #",
[0x006] = "ERROR: Incomplete unit detected: Unit #",
[0x007] = "INFO: Initialization complete: Unit #",
[0x008] = "WARNING: Unclean shutdown detected: Unit #",
[0x009] = "WARNING: ATA port timeout: Port #",
[0x00A] = "ERROR: Drive error: Port #",
[0x00B] = "INFO: Rebuild started: Unit #",
[0x00C] = "INFO: Initialization started: Unit #",
[0x00D] = "ERROR: Logical unit deleted: Unit #",
[0x00F] = "WARNING: SMART threshold exceeded: Port #",
[0x021] = "WARNING: ATA UDMA downgrade: Port #",
[0x021] = "WARNING: ATA UDMA upgrade: Port #",
[0x023] = "WARNING: Sector repair occurred: Port #",
[0x024] = "ERROR: SBUF integrity check failure",
[0x025] = "ERROR: Lost cached write: Port #",
[0x026] = "ERROR: Drive ECC error detected: Port #",
[0x027] = "ERROR: DCB checksum error: Port #",
[0x028] = "ERROR: DCB unsupported version: Port #",
[0x029] = "INFO: Verify started: Unit #",
[0x02A] = "ERROR: Verify failed: Port #",
[0x02B] = "INFO: Verify complete: Unit #",
[0x02C] = "WARNING: Overwrote bad sector during rebuild: Port #",
[0x02D] = "ERROR: Encountered bad sector during rebuild: Port #",
[0x02E] = "ERROR: Replacement drive is too small: Port #",
[0x02F] = "WARNING: Verify error: Unit not previously initialized: Unit #",
[0x030] = "ERROR: Drive not supported: Port #",
};
/*
......
......@@ -18,10 +18,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -18,10 +18,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -146,8 +146,4 @@ static int aha1542_biosparam(struct scsi_device *, struct block_device *,
#define AHA1542_SCATTER 16
#define AHA1542_CMDLUN 1
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -10,10 +10,6 @@ int NCR53c7x0_release (struct Scsi_Host *);
int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 3
#endif
......
......@@ -28,10 +28,6 @@ static int atp870u_release(struct Scsi_Host *);
#define ATP870U_SCATTER 128
#define ATP870U_CMDLUN 1
#ifndef NULL
#define NULL 0
#endif
extern const char *atp870u_info(struct Scsi_Host *);
#endif
......@@ -11,10 +11,6 @@ int NCR53c7x0_release (struct Scsi_Host *);
int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 3
#endif
......
......@@ -16,9 +16,6 @@
#include <linux/version.h>
#include <linux/types.h>
#ifndef NULL
#define NULL 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
......
......@@ -18,10 +18,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -67,9 +67,6 @@
#define UDWORD unsigned long
#define U32 u32
#ifndef NULL
#define NULL 0 /* zero */
#endif
#ifndef FAILURE
#define FAILURE (-1)
#endif
......
......@@ -96,17 +96,18 @@
static char *IMM_MODE_STRING[] =
{
"Autodetect",
"SPP",
"PS/2",
"EPP 8 bit",
"EPP 16 bit",
[IMM_AUTODETECT] = "Autodetect",
[IMM_NIBBLE] = "SPP",
[IMM_PS2] = "PS/2",
[IMM_EPP_8] = "EPP 8 bit",
[IMM_EPP_16] = "EPP 16 bit",
#ifdef CONFIG_SCSI_IZIP_EPP16
"EPP 16 bit",
[IMM_EPP_16] = "EPP 16 bit",
#else
"EPP 32 bit",
[IMM_EPP_32] = "EPP 32 bit",
#endif
"Unknown"};
[IMM_UNKNOWN] = "Unknown",
};
/* This is a global option */
int imm_sg = SG_ALL; /* enable/disable scatter-gather. */
......
......@@ -99,9 +99,6 @@ extern int i91u_biosparam(struct scsi_device *, struct block_device *,
#define UDWORD unsigned long
#define U32 u32
#ifndef NULL
#define NULL 0 /* zero */
#endif
#ifndef TRUE
#define TRUE (1) /* boolean true */
#endif
......
......@@ -88,9 +88,6 @@ static int inia100_bus_reset(Scsi_Cmnd *);
#define UDWORD unsigned long
#define U32 u32
#ifndef NULL
#define NULL 0 /* zero */
#endif
#ifndef FAILURE
#define FAILURE (-1)
#endif
......
......@@ -32,9 +32,6 @@
#define MACSCSI_PUBLIC_RELEASE 2
#ifndef ASM
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
......
......@@ -17,10 +17,6 @@ int wd33c93_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int wd33c93_abort(Scsi_Cmnd *);
int wd33c93_reset(Scsi_Cmnd *, unsigned int);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -11,10 +11,6 @@ int NCR53c7x0_release (struct Scsi_Host *);
int NCR53c7xx_reset(Scsi_Cmnd *, unsigned int);
void NCR53c7x0_intr(int irq, void *dev_id, struct pt_regs * regs);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 3
#endif
......
......@@ -123,10 +123,6 @@ static int pas16_bus_reset(Scsi_Cmnd *);
static int pas16_host_reset(Scsi_Cmnd *);
static int pas16_device_reset(Scsi_Cmnd *);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
......@@ -197,8 +197,4 @@ int Pci2000_BiosParam (struct scsi_device *sdev,
struct block_device *bdev,
sector_t capacity, int geom[]);
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -36,8 +36,4 @@ int Pci2220i_Release (struct Scsi_Host *pshost);
int Pci2220i_BiosParam (struct scsi_device *sdev,
struct block_device *dev,
sector_t capacity, int geom[]);
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -316,8 +316,4 @@ int Psi240i_Abort (Scsi_Cmnd *SCpnt);
int Psi240i_Reset (Scsi_Cmnd *SCpnt, unsigned int flags);
int Psi240i_BiosParam (struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int geom[]);
#ifndef NULL
#define NULL 0
#endif
#endif
......@@ -77,9 +77,4 @@ int isp2x00_abort(Scsi_Cmnd *);
int isp2x00_reset(Scsi_Cmnd *, unsigned int);
int isp2x00_biosparam(struct scsi_device *, struct block_device *,
sector_t, int[]);
#ifndef NULL
#define NULL (0)
#endif
#endif /* _QLOGICFC_H */
......@@ -66,8 +66,4 @@ int isp1020_abort(Scsi_Cmnd *);
int isp1020_reset(Scsi_Cmnd *, unsigned int);
int isp1020_biosparam(struct scsi_device *, struct block_device *,
sector_t, int[]);
#ifndef NULL
#define NULL (0)
#endif
#endif /* _QLOGICISP_H */
......@@ -6,10 +6,6 @@
#ifndef _SGIWD93_H
#define _SGIWD93_H
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 8
#endif
......
......@@ -36,11 +36,6 @@
#ifndef SUN3_NCR5380_H
#define SUN3_NCR5380_H
#ifndef NULL
#define NULL 0
#endif
#define SUN3SCSI_PUBLIC_RELEASE 1
/*
......
......@@ -100,10 +100,6 @@ static int t128_host_reset(Scsi_Cmnd *);
static int t128_bus_reset(Scsi_Cmnd *);
static int t128_device_reset(Scsi_Cmnd *);
#ifndef NULL
#define NULL 0
#endif
#ifndef CMD_PER_LUN
#define CMD_PER_LUN 2
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment