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: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
7875506f7a
commit
574c833ef3
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue