s390/ipl: Use kstrtobool() instead of strtobool() (second step)

Message ID 58a3ed2e21903a93dfd742943b1e6936863ca037.1673708887.git.christophe.jaillet@wanadoo.fr
State New
Headers
Series s390/ipl: Use kstrtobool() instead of strtobool() (second step) |

Commit Message

Christophe JAILLET Jan. 14, 2023, 3:08 p.m. UTC
  strtobool() is the same as kstrtobool().
However, the latter is more used within the kernel.

In order to remove strtobool() and slightly simplify kstrtox.h, switch to
the other function name.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
This patch is similar to the serie ([1]) that tries to axed all usages
of strtobool().
Most of the patches have been merged in -next.

Commit d9b25bdf57e4 ("s390/ipl: Use kstrtobool() instead of strtobool()")
already fixed this file, but a new usage has been introduce by commit
87fd22e0ae92 ("s390/ipl: add eckd support").

This patch has been cross-compiled with make.cross.

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 arch/s390/kernel/ipl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Heiko Carstens Jan. 15, 2023, 8:34 p.m. UTC | #1
On Sat, Jan 14, 2023 at 04:08:22PM +0100, Christophe JAILLET wrote:
> strtobool() is the same as kstrtobool().
> However, the latter is more used within the kernel.
> 
> In order to remove strtobool() and slightly simplify kstrtox.h, switch to
> the other function name.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is similar to the serie ([1]) that tries to axed all usages
> of strtobool().
> Most of the patches have been merged in -next.
> 
> Commit d9b25bdf57e4 ("s390/ipl: Use kstrtobool() instead of strtobool()")
> already fixed this file, but a new usage has been introduce by commit
> 87fd22e0ae92 ("s390/ipl: add eckd support").
> 
> This patch has been cross-compiled with make.cross.
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  arch/s390/kernel/ipl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks!
  

Patch

diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index fbd646dbf440..5547223acce0 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -1194,7 +1194,7 @@  static ssize_t reipl_eckd_clear_store(struct kobject *kobj,
 				      struct kobj_attribute *attr,
 				      const char *buf, size_t len)
 {
-	if (strtobool(buf, &reipl_eckd_clear) < 0)
+	if (kstrtobool(buf, &reipl_eckd_clear) < 0)
 		return -EINVAL;
 	return len;
 }