Skip to content
Commit 753d6770 authored by Vladis Dronov's avatar Vladis Dronov Committed by Herbert Xu
Browse files

hwrng: cn10k - Optimize cn10k_rng_read()



This function assumes that sizeof(void) is 1 and arithmetic works for
void pointers. This is a GNU C extention and may not work with other
compilers. Change this by using an u8 pointer.

Also move cn10k_read_trng() out of a loop thus saving some cycles.

Fixes: 38e9791a ("hwrng: cn10k - Add random number generator support")
Signed-off-by: default avatarVladis Dronov <vdronov@redhat.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 5a6477ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment