Commit d9d28518 authored by Harvey Harrison's avatar Harvey Harrison Committed by James Toy

Remove two now unnecessary local vars.

Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Cc: Boaz Harrosh <bharrosh@panasas.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 5aecaef6
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/unaligned.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/blkdev.h> #include <linux/blkdev.h>
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
...@@ -2429,8 +2430,8 @@ static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive) ...@@ -2429,8 +2430,8 @@ static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive)
{ {
register gdth_cmd_str *cmdp; register gdth_cmd_str *cmdp;
struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp); struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
ulong32 cnt, blockcnt; ulong32 blockcnt;
ulong64 no, blockno; ulong64 blockno;
int i, cmd_index, read_write, sgcnt, mode64; int i, cmd_index, read_write, sgcnt, mode64;
cmdp = ha->pccb; cmdp = ha->pccb;
...@@ -2498,19 +2499,15 @@ static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive) ...@@ -2498,19 +2499,15 @@ static int gdth_fill_cache_cmd(gdth_ha_str *ha, Scsi_Cmnd *scp, ushort hdrive)
if (read_write) { if (read_write) {
if (scp->cmd_len == 16) { if (scp->cmd_len == 16) {
memcpy(&no, &scp->cmnd[2], sizeof(ulong64)); blockno = get_unaligned_be64(&scp->cmnd[2]);
blockno = be64_to_cpu(no); blockcnt = get_unaligned_be32(&scp->cmnd[10]);
memcpy(&cnt, &scp->cmnd[10], sizeof(ulong32));
blockcnt = be32_to_cpu(cnt);
} else if (scp->cmd_len == 10) { } else if (scp->cmd_len == 10) {
memcpy(&no, &scp->cmnd[2], sizeof(ulong32)); blockno = get_unaligned_be32(&scp->cmnd[2]);
blockno = be32_to_cpu(no); blockcnt = get_unaligned_be16(&scp->cmnd[7]);
memcpy(&cnt, &scp->cmnd[7], sizeof(ushort));
blockcnt = be16_to_cpu(cnt);
} else { } else {
memcpy(&no, &scp->cmnd[0], sizeof(ulong32)); blockno = get_unaligned_be32(&scp->cmnd[2]);
blockno = be32_to_cpu(no) & 0x001fffffUL; blockno &= 0x001fffffUL;
blockcnt= scp->cmnd[4]==0 ? 0x100 : scp->cmnd[4]; blockcnt = scp->cmnd[4] == 0 ? 0x100 : scp->cmnd[4];
} }
if (mode64) { if (mode64) {
cmdp->u.cache64.BlockNo = blockno; cmdp->u.cache64.BlockNo = blockno;
......
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