Re: [PATCH] crypto: rng - Combine two seq_printf() calls into one in crypto_rng_show()

From: Markus Elfring

Date: Wed Nov 19 2025 - 05:22:57 EST


…>> +++ 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.

Would you expect to specify still two string literals at such a source code place?

Regards,
Markus