diff options
| author | Christophe JAILLET <[email protected]> | 2023-01-14 09:22:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-01-20 13:09:47 +0000 |
| commit | f7d85515bd21902b218370a1a6301f76e4e636ff (patch) | |
| tree | 5fa69453924d2d361e8e74059b218f945f31ded3 | |
| parent | test_firmware: use kernel-doc struct notation (diff) | |
| download | kernel-f7d85515bd21902b218370a1a6301f76e4e636ff.tar.gz kernel-f7d85515bd21902b218370a1a6301f76e4e636ff.zip | |
test_firmware: Use kstrtobool() instead of strtobool()
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.
While at it, include the corresponding header file (<linux/kstrtox.h>)
Signed-off-by: Christophe JAILLET <[email protected]>
Acked-by: Luis Chamberlain <[email protected]>
Link: https://lore.kernel.org/r/34f04735d20e0138695dd4070651bd860a36b81c.1673688120.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | lib/test_firmware.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/test_firmware.c b/lib/test_firmware.c index 6d7becc7e5d5..05ed84c2fc4c 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -22,6 +22,7 @@ #include <linux/slab.h> #include <linux/uaccess.h> #include <linux/delay.h> +#include <linux/kstrtox.h> #include <linux/kthread.h> #include <linux/vmalloc.h> #include <linux/efi_embedded_fw.h> @@ -358,7 +359,7 @@ static int test_dev_config_update_bool(const char *buf, size_t size, int ret; mutex_lock(&test_fw_mutex); - if (strtobool(buf, cfg) < 0) + if (kstrtobool(buf, cfg) < 0) ret = -EINVAL; else ret = size; |
