Commit 574c833e authored by Yang Guang's avatar Yang Guang Committed by Herbert Xu

crypto: hisilicon/hpre - use swap() to make code cleaner

Use the macro 'swap()' defined in 'include/linux/minmax.h' to avoid
opencoding it.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarYang Guang <yang.guang5@zte.com.cn>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7875506f
......@@ -1177,13 +1177,10 @@ static void hpre_rsa_exit_tfm(struct crypto_akcipher *tfm)
static void hpre_key_to_big_end(u8 *data, int len)
{
int i, j;
u8 tmp;
for (i = 0; i < len / 2; i++) {
j = len - i - 1;
tmp = data[j];
data[j] = data[i];
data[i] = tmp;
swap(data[j], data[i]);
}
}
......
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