diff options
author | Andy Grover <agrover@redhat.com> | 2011-06-28 13:31:18 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-07-22 05:37:48 -0400 |
commit | 3a86720567fd92819b449df10db85a2f73447d87 (patch) | |
tree | 2d971854eabe7b4bc8ff091b0e9d91dca8377bbe /drivers/target/target_core_scdb.c | |
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/target_core_scdb.c')
-rw-r--r-- | drivers/target/target_core_scdb.c | 20 |
1 files changed, 10 insertions, 10 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 @@ | |||
42 | */ | 42 | */ |
43 | void split_cdb_XX_6( | 43 | void split_cdb_XX_6( |
44 | unsigned long long lba, | 44 | unsigned long long lba, |
45 | u32 *sectors, | 45 | u32 sectors, |
46 | unsigned char *cdb) | 46 | unsigned char *cdb) |
47 | { | 47 | { |
48 | cdb[1] = (lba >> 16) & 0x1f; | 48 | cdb[1] = (lba >> 16) & 0x1f; |
49 | cdb[2] = (lba >> 8) & 0xff; | 49 | cdb[2] = (lba >> 8) & 0xff; |
50 | cdb[3] = lba & 0xff; | 50 | cdb[3] = lba & 0xff; |
51 | cdb[4] = *sectors & 0xff; | 51 | cdb[4] = sectors & 0xff; |
52 | } | 52 | } |
53 | 53 | ||
54 | /* split_cdb_XX_10(): | 54 | /* split_cdb_XX_10(): |
@@ -57,11 +57,11 @@ void split_cdb_XX_6( | |||
57 | */ | 57 | */ |
58 | void split_cdb_XX_10( | 58 | void split_cdb_XX_10( |
59 | unsigned long long lba, | 59 | unsigned long long lba, |
60 | u32 *sectors, | 60 | u32 sectors, |
61 | unsigned char *cdb) | 61 | unsigned char *cdb) |
62 | { | 62 | { |
63 | put_unaligned_be32(lba, &cdb[2]); | 63 | put_unaligned_be32(lba, &cdb[2]); |
64 | put_unaligned_be16(*sectors, &cdb[7]); | 64 | put_unaligned_be16(sectors, &cdb[7]); |
65 | } | 65 | } |
66 | 66 | ||
67 | /* split_cdb_XX_12(): | 67 | /* split_cdb_XX_12(): |
@@ -70,11 +70,11 @@ void split_cdb_XX_10( | |||
70 | */ | 70 | */ |
71 | void split_cdb_XX_12( | 71 | void split_cdb_XX_12( |
72 | unsigned long long lba, | 72 | unsigned long long lba, |
73 | u32 *sectors, | 73 | u32 sectors, |
74 | unsigned char *cdb) | 74 | unsigned char *cdb) |
75 | { | 75 | { |
76 | put_unaligned_be32(lba, &cdb[2]); | 76 | put_unaligned_be32(lba, &cdb[2]); |
77 | put_unaligned_be32(*sectors, &cdb[6]); | 77 | put_unaligned_be32(sectors, &cdb[6]); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* split_cdb_XX_16(): | 80 | /* split_cdb_XX_16(): |
@@ -83,11 +83,11 @@ void split_cdb_XX_12( | |||
83 | */ | 83 | */ |
84 | void split_cdb_XX_16( | 84 | void split_cdb_XX_16( |
85 | unsigned long long lba, | 85 | unsigned long long lba, |
86 | u32 *sectors, | 86 | u32 sectors, |
87 | unsigned char *cdb) | 87 | unsigned char *cdb) |
88 | { | 88 | { |
89 | put_unaligned_be64(lba, &cdb[2]); | 89 | put_unaligned_be64(lba, &cdb[2]); |
90 | put_unaligned_be32(*sectors, &cdb[10]); | 90 | put_unaligned_be32(sectors, &cdb[10]); |
91 | } | 91 | } |
92 | 92 | ||
93 | /* | 93 | /* |
@@ -97,9 +97,9 @@ void split_cdb_XX_16( | |||
97 | */ | 97 | */ |
98 | void split_cdb_XX_32( | 98 | void split_cdb_XX_32( |
99 | unsigned long long lba, | 99 | unsigned long long lba, |
100 | u32 *sectors, | 100 | u32 sectors, |
101 | unsigned char *cdb) | 101 | unsigned char *cdb) |
102 | { | 102 | { |
103 | put_unaligned_be64(lba, &cdb[12]); | 103 | put_unaligned_be64(lba, &cdb[12]); |
104 | put_unaligned_be32(*sectors, &cdb[28]); | 104 | put_unaligned_be32(sectors, &cdb[28]); |
105 | } | 105 | } |