diff options
author | Andy Grover <agrover@redhat.com> | 2011-06-28 10:31:18 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 09:37:48 +0000 |
commit | 3a86720567fd92819b449df10db85a2f73447d87 (patch) | |
tree | 2d971854eabe7b4bc8ff091b0e9d91dca8377bbe /drivers/target | |
parent | d0229ae3fed59b4009e33f836d9ad4e312294d46 (diff) |
target: Pass 2nd param of transport_split_cdb by value
Since sectors is not modified, it's more straightforward to do this.
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_scdb.c | 20 | ||||
-rw-r--r-- | drivers/target/target_core_scdb.h | 10 | ||||
-rw-r--r-- | drivers/target/target_core_transport.c | 3 |
3 files changed, 16 insertions, 17 deletions
diff --git a/drivers/target/target_core_scdb.c b/drivers/target/target_core_scdb.c index dc6fed037ab3..72843441d4fa 100644 --- a/drivers/target/target_core_scdb.c +++ b/drivers/target/target_core_scdb.c @@ -42,13 +42,13 @@ */ void split_cdb_XX_6( unsigned long long lba, - u32 *sectors, + u32 sectors, unsigned char *cdb) { cdb[1] = (lba >> 16) & 0x1f; cdb[2] = (lba >> 8) & 0xff; cdb[3] = lba & 0xff; - cdb[4] = *sectors & 0xff; + cdb[4] = sectors & 0xff; } /* split_cdb_XX_10(): @@ -57,11 +57,11 @@ void split_cdb_XX_6( */ void split_cdb_XX_10( unsigned long long lba, - u32 *sectors, + u32 sectors, unsigned char *cdb) { put_unaligned_be32(lba, &cdb[2]); - put_unaligned_be16(*sectors, &cdb[7]); + put_unaligned_be16(sectors, &cdb[7]); } /* split_cdb_XX_12(): @@ -70,11 +70,11 @@ void split_cdb_XX_10( */ void split_cdb_XX_12( unsigned long long lba, - u32 *sectors, + u32 sectors, unsigned char *cdb) { put_unaligned_be32(lba, &cdb[2]); - put_unaligned_be32(*sectors, &cdb[6]); + put_unaligned_be32(sectors, &cdb[6]); } /* split_cdb_XX_16(): @@ -83,11 +83,11 @@ void split_cdb_XX_12( */ void split_cdb_XX_16( unsigned long long lba, - u32 *sectors, + u32 sectors, unsigned char *cdb) { put_unaligned_be64(lba, &cdb[2]); - put_unaligned_be32(*sectors, &cdb[10]); + put_unaligned_be32(sectors, &cdb[10]); } /* @@ -97,9 +97,9 @@ void split_cdb_XX_16( */ void split_cdb_XX_32( unsigned long long lba, - u32 *sectors, + u32 sectors, unsigned char *cdb) { put_unaligned_be64(lba, &cdb[12]); - put_unaligned_be32(*sectors, &cdb[28]); + put_unaligned_be32(sectors, &cdb[28]); } diff --git a/drivers/target/target_core_scdb.h b/drivers/target/target_core_scdb.h index 98cd1c01ed83..48e9ccc9585e 100644 --- a/drivers/target/target_core_scdb.h +++ b/drivers/target/target_core_scdb.h @@ -1,10 +1,10 @@ #ifndef TARGET_CORE_SCDB_H #define TARGET_CORE_SCDB_H -extern void split_cdb_XX_6(unsigned long long, u32 *, unsigned char *); -extern void split_cdb_XX_10(unsigned long long, u32 *, unsigned char *); -extern void split_cdb_XX_12(unsigned long long, u32 *, unsigned char *); -extern void split_cdb_XX_16(unsigned long long, u32 *, unsigned char *); -extern void split_cdb_XX_32(unsigned long long, u32 *, unsigned char *); +extern void split_cdb_XX_6(unsigned long long, u32, unsigned char *); +extern void split_cdb_XX_10(unsigned long long, u32, unsigned char *); +extern void split_cdb_XX_12(unsigned long long, u32, unsigned char *); +extern void split_cdb_XX_16(unsigned long long, u32, unsigned char *); +extern void split_cdb_XX_32(unsigned long long, u32, unsigned char *); #endif /* TARGET_CORE_SCDB_H */ diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 267113c1607c..b499d14f4637 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -4728,8 +4728,7 @@ static u32 transport_allocate_tasks( scsi_command_size(cmd->t_task_cdb)); /* Update new cdb with updated lba/sectors */ - cmd->transport_split_cdb(task->task_lba, - &task->task_sectors, cdb); + cmd->transport_split_cdb(task->task_lba, task->task_sectors, cdb); /* * Perform the SE OBJ plugin and/or Transport plugin specific |