From: Thorsten Blum Date: Tue, 5 May 2026 09:45:56 +0000 (+0200) Subject: hwrng: core - use bool for wait parameter in rng_get_data X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3541710791922e6ba090eb18f60b932f76c9b8cb;p=thirdparty%2Fkernel%2Flinux.git hwrng: core - use bool for wait parameter in rng_get_data The wait parameter in rng_get_data() is a boolean flag - use bool instead of int to better reflect its actual type. Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu --- diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 68add1a97f31d..870e77c9ec207 100644 --- a/drivers/char/hw_random/core.c +++ b/drivers/char/hw_random/core.c @@ -210,8 +210,8 @@ static int rng_dev_open(struct inode *inode, struct file *filp) return 0; } -static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size, - int wait) { +static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size, bool wait) +{ int present; BUG_ON(!mutex_is_locked(&reading_mutex)); @@ -534,8 +534,7 @@ static int hwrng_fillfn(void *unused) } mutex_lock(&reading_mutex); - rc = rng_get_data(rng, rng_fillbuf, - rng_buffer_size(), 1); + rc = rng_get_data(rng, rng_fillbuf, rng_buffer_size(), true); if (current_quality != rng->quality) rng->quality = current_quality; /* obsolete */ quality = rng->quality;