lkml.org 
[lkml]   [2018]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 2/4] random: Return nbytes filled from hw RNG
On Tue, Jun 12, 2018 at 3:39 AM, Tobin C. Harding <me@tobin.cc> wrote:
> Currently the function get_random_bytes_arch() has return value 'void'.
> If the hw RNG fails we currently fall back to using get_random_bytes().
> This defeats the purpose of requesting random material from the hw RNG
> in the first place.

> - int chunk = min(nbytes, (int)sizeof(unsigned long));
> + int chunk = min_t(int, left, (int)sizeof(unsigned long));

Isn't this (int) implied when you use min_t(int, ...) ?

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-06-12 10:40    [W:0.090 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site