lkml.org 
[lkml]   [2022]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] random: pull add_hwgenerator_randomness() declaration into random.h
On Sun, Feb 13, 2022 at 04:25:22PM +0100, Jason A. Donenfeld wrote:
> add_hwgenerator_randomness() is a function implemented and documented
> inside of random.c. It is the way that hardware RNGs push data into it.
> Therefore, it should be declared in random.h. Otherwise sparse complains
> with:
>
> random.c:1137:6: warning: symbol 'add_hwgenerator_randomness' was not declared. Should it be static?
>
> The alternative would be to include hw_random.h into random.c, but that
> wouldn't really be good for anything except slowing down compile time.
>
> Cc: Dominik Brodowski <linux@dominikbrodowski.net>
> Cc: Matt Mackall <mpm@selenic.com>
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: linux-crypto@vger.kernel.org
> Cc: Kalle Valo <kvalo@kernel.org>
> Cc: ath9k-devel@qca.qualcomm.com
> Cc: Theodore Ts'o <tytso@mit.edu>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> ---
> drivers/char/hw_random/core.c | 1 +
> drivers/net/wireless/ath/ath9k/rng.c | 1 +
> include/linux/hw_random.h | 2 --
> include/linux/random.h | 2 ++
> 4 files changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@google.com>

- Eric

\
 
 \ /
  Last update: 2022-02-21 07:20    [W:0.086 / U:1.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site