Commit 1fe6dbf4 authored by Dave Jones's avatar Dave Jones Committed by James Bottomley

[SCSI] gdth: Convert to use regular kernel types.

converted using this script..

 perl -p -i -e 's|ulong32|u32|g' drivers/scsi/gdth*
 perl -p -i -e 's|ulong64|u64|g' drivers/scsi/gdth*
 perl -p -i -e 's|ushort|u16|g' drivers/scsi/gdth*
 perl -p -i -e 's|unchar|u8|g' drivers/scsi/gdth*
 perl -p -i -e 's|ulong|unsigned long|g' drivers/scsi/gdth*
 perl -p -i -e 's|PACKED|__attribute__((packed))|g' drivers/scsi/gdth*

sha1sum of the generated code was identical before and after.
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent e7efe593
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -43,7 +43,7 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer, ...@@ -43,7 +43,7 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer,
int i, found; int i, found;
gdth_cmd_str gdtcmd; gdth_cmd_str gdtcmd;
gdth_cpar_str *pcpar; gdth_cpar_str *pcpar;
ulong64 paddr; u64 paddr;
char cmnd[MAX_COMMAND_SIZE]; char cmnd[MAX_COMMAND_SIZE];
memset(cmnd, 0xff, 12); memset(cmnd, 0xff, 12);
...@@ -156,8 +156,8 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, ...@@ -156,8 +156,8 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
off_t begin = 0,pos = 0; off_t begin = 0,pos = 0;
int id, i, j, k, sec, flag; int id, i, j, k, sec, flag;
int no_mdrv = 0, drv_no, is_mirr; int no_mdrv = 0, drv_no, is_mirr;
ulong32 cnt; u32 cnt;
ulong64 paddr; u64 paddr;
int rc = -ENOMEM; int rc = -ENOMEM;
gdth_cmd_str *gdtcmd; gdth_cmd_str *gdtcmd;
...@@ -220,14 +220,14 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, ...@@ -220,14 +220,14 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
if (ha->more_proc) if (ha->more_proc)
sprintf(hrec, "%d.%02d.%02d-%c%03X", sprintf(hrec, "%d.%02d.%02d-%c%03X",
(unchar)(ha->binfo.upd_fw_ver>>24), (u8)(ha->binfo.upd_fw_ver>>24),
(unchar)(ha->binfo.upd_fw_ver>>16), (u8)(ha->binfo.upd_fw_ver>>16),
(unchar)(ha->binfo.upd_fw_ver), (u8)(ha->binfo.upd_fw_ver),
ha->bfeat.raid ? 'R':'N', ha->bfeat.raid ? 'R':'N',
ha->binfo.upd_revision); ha->binfo.upd_revision);
else else
sprintf(hrec, "%d.%02d", (unchar)(ha->cpar.version>>8), sprintf(hrec, "%d.%02d", (u8)(ha->cpar.version>>8),
(unchar)(ha->cpar.version)); (u8)(ha->cpar.version));
size = sprintf(buffer+len, size = sprintf(buffer+len,
" Driver Ver.: \t%-10s\tFirmware Ver.: \t%s\n", " Driver Ver.: \t%-10s\tFirmware Ver.: \t%s\n",
...@@ -281,7 +281,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, ...@@ -281,7 +281,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
pds->bid = ha->raw[i].local_no; pds->bid = ha->raw[i].local_no;
pds->first = 0; pds->first = 0;
pds->entries = ha->raw[i].pdev_cnt; pds->entries = ha->raw[i].pdev_cnt;
cnt = (3*GDTH_SCRATCH/4 - 5 * sizeof(ulong32)) / cnt = (3*GDTH_SCRATCH/4 - 5 * sizeof(u32)) /
sizeof(pds->list[0]); sizeof(pds->list[0]);
if (pds->entries > cnt) if (pds->entries > cnt)
pds->entries = cnt; pds->entries = cnt;
...@@ -604,7 +604,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, ...@@ -604,7 +604,7 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
size = sprintf(buffer+len, size = sprintf(buffer+len,
" Capacity [MB]:\t%-6d \tStart Sector: \t%d\n", " Capacity [MB]:\t%-6d \tStart Sector: \t%d\n",
(ulong32)(ha->hdr[i].size/2048), ha->hdr[i].start_sec); (u32)(ha->hdr[i].size/2048), ha->hdr[i].start_sec);
len += size; pos = begin + len; len += size; pos = begin + len;
if (pos < offset) { if (pos < offset) {
len = 0; len = 0;
...@@ -664,9 +664,9 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length, ...@@ -664,9 +664,9 @@ static int gdth_get_info(char *buffer,char **start,off_t offset,int length,
} }
static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch, static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch,
ulong64 *paddr) u64 *paddr)
{ {
ulong flags; unsigned long flags;
char *ret_val; char *ret_val;
if (size == 0) if (size == 0)
...@@ -691,9 +691,9 @@ static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch, ...@@ -691,9 +691,9 @@ static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch,
return ret_val; return ret_val;
} }
static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr) static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, u64 paddr)
{ {
ulong flags; unsigned long flags;
if (buf == ha->pscratch) { if (buf == ha->pscratch) {
spin_lock_irqsave(&ha->smp_lock, flags); spin_lock_irqsave(&ha->smp_lock, flags);
...@@ -705,16 +705,16 @@ static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr) ...@@ -705,16 +705,16 @@ static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr)
} }
#ifdef GDTH_IOCTL_PROC #ifdef GDTH_IOCTL_PROC
static int gdth_ioctl_check_bin(gdth_ha_str *ha, ushort size) static int gdth_ioctl_check_bin(gdth_ha_str *ha, u16 size)
{ {
ulong flags; unsigned long flags;
int ret_val; int ret_val;
spin_lock_irqsave(&ha->smp_lock, flags); spin_lock_irqsave(&ha->smp_lock, flags);
ret_val = FALSE; ret_val = FALSE;
if (ha->scratch_busy) { if (ha->scratch_busy) {
if (((gdth_iord_str *)ha->pscratch)->size == (ulong32)size) if (((gdth_iord_str *)ha->pscratch)->size == (u32)size)
ret_val = TRUE; ret_val = TRUE;
} }
spin_unlock_irqrestore(&ha->smp_lock, flags); spin_unlock_irqrestore(&ha->smp_lock, flags);
...@@ -724,11 +724,11 @@ static int gdth_ioctl_check_bin(gdth_ha_str *ha, ushort size) ...@@ -724,11 +724,11 @@ static int gdth_ioctl_check_bin(gdth_ha_str *ha, ushort size)
static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id) static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id)
{ {
ulong flags; unsigned long flags;
int i; int i;
Scsi_Cmnd *scp; Scsi_Cmnd *scp;
struct gdth_cmndinfo *cmndinfo; struct gdth_cmndinfo *cmndinfo;
unchar b, t; u8 b, t;
spin_lock_irqsave(&ha->smp_lock, flags); spin_lock_irqsave(&ha->smp_lock, flags);
...@@ -738,8 +738,8 @@ static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id) ...@@ -738,8 +738,8 @@ static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id)
b = scp->device->channel; b = scp->device->channel;
t = scp->device->id; t = scp->device->id;
if (!SPECIAL_SCP(scp) && t == (unchar)id && if (!SPECIAL_SCP(scp) && t == (u8)id &&
b == (unchar)busnum) { b == (u8)busnum) {
cmndinfo->wait_for_completion = 0; cmndinfo->wait_for_completion = 0;
spin_unlock_irqrestore(&ha->smp_lock, flags); spin_unlock_irqrestore(&ha->smp_lock, flags);
while (!cmndinfo->wait_for_completion) while (!cmndinfo->wait_for_completion)
......
...@@ -17,8 +17,8 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer, ...@@ -17,8 +17,8 @@ static int gdth_set_asc_info(struct Scsi_Host *host, char *buffer,
int length, gdth_ha_str *ha); int length, gdth_ha_str *ha);
static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch, static char *gdth_ioctl_alloc(gdth_ha_str *ha, int size, int scratch,
ulong64 *paddr); u64 *paddr);
static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, ulong64 paddr); static void gdth_ioctl_free(gdth_ha_str *ha, int size, char *buf, u64 paddr);
static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id); static void gdth_wait_completion(gdth_ha_str *ha, int busnum, int id);
#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