]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
crypto: hifn_795x - replace simple_strtoul with kstrtouint
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 23 Sep 2025 01:03:04 +0000 (03:03 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Oct 2025 08:03:57 +0000 (16:03 +0800)
commit6af9914f7bbfdf3e0a53626a5be49d6add8e9e15
treebcc0959757889c667d3a909725e8002f1170476c
parent33eea63ff9c6abf26236dcad41165d3cc499d905
crypto: hifn_795x - replace simple_strtoul with kstrtouint

Replace simple_strtoul() with the recommended kstrtouint() for parsing
the 'hifn_pll_ref=' module parameter. Unlike simple_strtoul(), which
returns an unsigned long, kstrtouint() converts the string directly to
an unsigned integer and avoids implicit casting.

Check the return value of kstrtouint() and fall back to 66 MHz if
parsing fails. This adds error handling while preserving existing
behavior for valid values, and removes use of the deprecated
simple_strtoul() helper.

Add a space in the log message to correctly format "66 MHz" while we're
at it.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hifn_795x.c