From 1ad5288f2bd37818fc90b77635611110c44df104 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Mon, 2 Jan 2023 13:15:54 -0800 Subject: test_firmware: use kernel-doc struct notation Add "struct" to the kernel-doc notation to prevent a warning: lib/test_firmware.c:98: warning: cannot understand function prototype: 'struct test_config ' Signed-off-by: Randy Dunlap Cc: Luis Chamberlain Cc: Russ Weight Cc: Kees Cook Cc: Greg Kroah-Hartman Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20230102211554.25629-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman --- lib/test_firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/test_firmware.c') diff --git a/lib/test_firmware.c b/lib/test_firmware.c index e207bc08820d..6d7becc7e5d5 100644 --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -50,7 +50,7 @@ struct test_batched_req { }; /** - * test_config - represents configuration for the test for different triggers + * struct test_config - represents configuration for the test for different triggers * * @name: the name of the firmware file to look for * @into_buf: when the into_buf is used if this is true -- cgit v1.2.3 From f7d85515bd21902b218370a1a6301f76e4e636ff Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Sat, 14 Jan 2023 10:22:03 +0100 Subject: 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 () Signed-off-by: Christophe JAILLET Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/34f04735d20e0138695dd4070651bd860a36b81c.1673688120.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman --- lib/test_firmware.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/test_firmware.c') 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 #include #include +#include #include #include #include @@ -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; -- cgit v1.2.3