Re: [PATCH 2/3] random: Return nbytes filled from hw RNG

From: Tobin C. Harding
Date: Tue May 01 2018 - 22:07:32 EST


On Tue, May 01, 2018 at 09:39:02PM -0400, Steven Rostedt wrote:
> On Wed, 2 May 2018 09:33:39 +1000
> "Tobin C. Harding" <me@xxxxxxxx> wrote:
>
> > diff --git a/drivers/char/random.c b/drivers/char/random.c
> > index 031d18b31e0f..3a66507ea60b 100644
> > --- a/drivers/char/random.c
> > +++ b/drivers/char/random.c
> > @@ -1725,26 +1725,28 @@ EXPORT_SYMBOL(del_random_ready_callback);
> > * key known by the NSA). So it's useful if we need the speed, but
> > * only if we're willing to trust the hardware manufacturer not to
> > * have put in a back door.
> > + *
> > + * Return number of bytes filled in.
> > */
> > -void get_random_bytes_arch(void *buf, int nbytes)
> > +int __must_check get_random_bytes_arch(void *buf, int nbytes)
>
> The "__must_check" makes no sense in the C file. It belongs in the
> header file. There wont be any complaint about it here.

Oh thanks.

/steve schooling noobs all day long