summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-09-19 22:30:11 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-30 11:19:43 +1100
commit6df5b9f48dd0e77fa796b9b7d3fde7cc5f1237f2 (patch)
treeb13c0941fcbde9a95fece66d02bb0b558cf98041 /crypto
parent378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (diff)
downloadlwn-6df5b9f48dd0e77fa796b9b7d3fde7cc5f1237f2.tar.gz
lwn-6df5b9f48dd0e77fa796b9b7d3fde7cc5f1237f2.zip
[CRYPTO] Simplify one-member scatterlist expressions
This patch rewrites various occurences of &sg[0] where sg is an array of length one to simply sg. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/tcrypt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 577a3aff3113..53f4ee804bdb 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -415,12 +415,12 @@ out:
static int test_cipher_jiffies(struct crypto_tfm *tfm, int enc, char *p,
int blen, int sec)
{
- struct scatterlist sg[8];
+ struct scatterlist sg[1];
unsigned long start, end;
int bcount;
int ret;
- sg_set_buf(&sg[0], p, blen);
+ sg_set_buf(sg, p, blen);
for (start = jiffies, end = start + sec * HZ, bcount = 0;
time_before(jiffies, end); bcount++) {
@@ -441,12 +441,12 @@ static int test_cipher_jiffies(struct crypto_tfm *tfm, int enc, char *p,
static int test_cipher_cycles(struct crypto_tfm *tfm, int enc, char *p,
int blen)
{
- struct scatterlist sg[8];
+ struct scatterlist sg[1];
unsigned long cycles = 0;
int ret = 0;
int i;
- sg_set_buf(&sg[0], p, blen);
+ sg_set_buf(sg, p, blen);
local_bh_disable();
local_irq_disable();