Skip to content
Commit 17a1deb5 authored by Vladis Dronov's avatar Vladis Dronov Committed by Ruiqiang Hao
Browse files

hwrng: cn10k - Optimize cn10k_rng_read()



commit d26a602acfdc543a196ec1d12463c8e5de6ff73a from
git@git.assembla.com:cavium/WindRiver.linux.git

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.

Change-Id: I3ddfd9e2142764d90b6ed7b8ad996cc4d3f7b2e4
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>
Signed-off-by: default avatarAnil Kumar Reddy <areddy3@marvell.com>
Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/87095


Reviewed-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
Tested-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: default avatarRuiqiang Hao <Ruiqiang.Hao@windriver.com>
parent c1484be4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment