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