Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-crypto@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Neil Horman <nhorman@tuxdriver.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: rng - Combine two seq_printf() calls into one in crypto_rng_show()
Date: Wed, 19 Nov 2025 12:45:36 +0800	[thread overview]
Message-ID: <aR1LcMOO0B6qUdOX@gondor.apana.org.au> (raw)
In-Reply-To: <d9574f40-8d0f-4f14-bc9f-b29c56069b8b@web.de>

On Mon, Nov 10, 2025 at 04:56:10PM +0100, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 10 Nov 2025 16:45:13 +0100
> 
> A bit of data was put into a sequence by two separate function calls.
> Print the same data by a single function call instead.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  crypto/rng.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/crypto/rng.c b/crypto/rng.c
> index ee1768c5a400..479c4ac6fb6c 100644
> --- a/crypto/rng.c
> +++ b/crypto/rng.c
> @@ -81,8 +81,7 @@ static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
>  	__maybe_unused;
>  static void crypto_rng_show(struct seq_file *m, struct crypto_alg *alg)
>  {
> -	seq_printf(m, "type         : rng\n");
> -	seq_printf(m, "seedsize     : %u\n", seedsize(alg));
> +	seq_printf(m, "type         : rng\nseedsize     : %u\n", seedsize(alg));

This makes the code look worse and appears to be an optimisation
that isn't really needed.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2025-11-19  4:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 15:56 [PATCH] crypto: rng - Combine two seq_printf() calls into one in crypto_rng_show() Markus Elfring
2025-11-19  4:45 ` Herbert Xu [this message]
2025-11-19 10:16   ` Markus Elfring

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=aR1LcMOO0B6qUdOX@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=Markus.Elfring@web.de \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    /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