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

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
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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]);
	}
}