public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] hwrng: core - use bool for wait parameter in rng_get_data
Date: Mon, 4 May 2026 17:44:13 +0300	[thread overview]
Message-ID: <afiwvXUnPhZ6xcAV@ashevche-desk.local> (raw)
In-Reply-To: <afivHbWdCprHpJSB@linux.dev>

On Mon, May 04, 2026 at 04:37:17PM +0200, Thorsten Blum wrote:
> On Mon, May 04, 2026 at 03:54:14PM +0200, Andy Shevchenko wrote:
> > On Thu, Apr 30, 2026 at 01:00:49PM +0200, Thorsten Blum wrote:

...

> > >  static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size,
> > > -			int wait) {
> > > +			bool wait) {
> > 
> > You want to fix the checkpatch warnings while at it and indentation.
> 
> I just checked again, but I don't get any checkpatch warnings.

Hmm... I remember for sure that checkpatch warns when it's a { on the line of
the prototype... Maybe it's about different scenario. Whatever, the coding
style is to have { on the new line.

...

> > > -		rc = rng_get_data(rng, rng_fillbuf,
> > > -				  rng_buffer_size(), 1);
> > > +		rc = rng_get_data(rng, rng_fillbuf, rng_buffer_size(), true);
> > 
> > Is it the only user? Why parameter is needed at all?
> 
> The other one in rng_dev_read() already uses a boolean expression, hence
> no changes.

Good, thanks for clarification.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-05-04 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 11:00 [PATCH 1/4] hwrng: core - drop unnecessary forward declarations Thorsten Blum
2026-04-30 11:00 ` [PATCH 2/4] hwrng: core - use bool for wait parameter in rng_get_data Thorsten Blum
2026-05-04 13:54   ` Andy Shevchenko
2026-05-04 14:37     ` Thorsten Blum
2026-05-04 14:44       ` Andy Shevchenko [this message]
2026-04-30 11:00 ` [PATCH 3/4] hwrng: core - use MAX to simplify RNG_BUFFER_SIZE Thorsten Blum
2026-05-04 13:56   ` Andy Shevchenko
2026-05-05  5:33   ` Herbert Xu
2026-04-30 11:00 ` [PATCH 4/4] hwrng: core - use sysfs_emit_at in rng_available_show Thorsten Blum
2026-05-04 13:58   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=afiwvXUnPhZ6xcAV@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olivia@selenic.com \
    --cc=thorsten.blum@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox