diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2005-09-19 14:30:11 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-30 02:19:43 +0200 |
commit | 6df5b9f48dd0e77fa796b9b7d3fde7cc5f1237f2 (patch) | |
tree | b13c0941fcbde9a95fece66d02bb0b558cf98041 /drivers | |
parent | [PATCH] Use sg_set_buf/sg_init_one where applicable (diff) | |
download | linux-6df5b9f48dd0e77fa796b9b7d3fde7cc5f1237f2.tar.xz linux-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 'drivers')
-rw-r--r-- | drivers/net/wireless/airo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 1609ce11389d..750c0167539c 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -1591,9 +1591,9 @@ static void emmh32_setseed(emmh32_context *context, u8 *pkey, int keylen, struct aes_counter[12] = (u8)(counter >> 24); counter++; memcpy (plain, aes_counter, 16); - sg_set_buf(&sg[0], plain, 16); + sg_set_buf(sg, plain, 16); crypto_cipher_encrypt(tfm, sg, sg, 16); - cipher = kmap(sg[0].page) + sg[0].offset; + cipher = kmap(sg->page) + sg->offset; for (j=0; (j<16) && (i< (sizeof(context->coeff)/sizeof(context->coeff[0]))); ) { context->coeff[i++] = ntohl(*(u32 *)&cipher[j]); j += 4; |