]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: Use kstrtobool() instead of strtobool()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 1 Nov 2022 21:13:50 +0000 (22:13 +0100)
committerKalle Valo <kvalo@kernel.org>
Tue, 8 Nov 2022 07:39:04 +0000 (09:39 +0200)
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 <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/1ff34549af5ad6f7c80d5b9e11872b5499065fc1.1667336095.git.christophe.jaillet@wanadoo.fr
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/tx99.c
drivers/net/wireless/marvell/mwifiex/debugfs.c
drivers/net/wireless/marvell/mwifiex/main.h

index c861e66ef6bc54b16d76b4d3dff15b9c372e8ee1..b9aea1510f7bb7032ab62483f5e2d0ef661e41a8 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/vmalloc.h>
 #include <linux/crc32.h>
 #include <linux/firmware.h>
+#include <linux/kstrtox.h>
 
 #include "core.h"
 #include "debug.h"
@@ -1975,7 +1976,7 @@ static ssize_t ath10k_write_btcoex(struct file *file,
 
        buf[buf_size] = '\0';
 
-       if (strtobool(buf, &val) != 0)
+       if (kstrtobool(buf, &val) != 0)
                return -EINVAL;
 
        if (!ar->coex_support)
@@ -2113,7 +2114,7 @@ static ssize_t ath10k_write_peer_stats(struct file *file,
 
        buf[buf_size] = '\0';
 
-       if (strtobool(buf, &val) != 0)
+       if (kstrtobool(buf, &val) != 0)
                return -EINVAL;
 
        mutex_lock(&ar->conf_mutex);
index 3ccf8cfc6b6338f16624a731d943007318b9cf95..2cc23605c9fc538ffc2fc6b3488c955a89cd7f6e 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/etherdevice.h>
 #include <linux/device.h>
 #include <linux/interrupt.h>
+#include <linux/kstrtox.h>
 #include <linux/leds.h>
 #include <linux/completion.h>
 #include <linux/time.h>
index 95544ce05acf9d35f7dc64b8f6dd5fb7c1e32b25..8a996ed9a3bef2b143dd7600b9c8564648d54719 100644 (file)
@@ -189,7 +189,7 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,
 
        buf[len] = '\0';
 
-       if (strtobool(buf, &start))
+       if (kstrtobool(buf, &start))
                return -EINVAL;
 
        mutex_lock(&sc->mutex);
index bda53cb91f376c807cb273fe31d041289db40c26..52b18f4a774b761e84050f2307071e4f070fa998 100644 (file)
@@ -874,7 +874,7 @@ mwifiex_timeshare_coex_write(struct file *file, const char __user *ubuf,
        if (copy_from_user(&kbuf, ubuf, min_t(size_t, sizeof(kbuf) - 1, count)))
                return -EFAULT;
 
-       if (strtobool(kbuf, &timeshare_coex))
+       if (kstrtobool(kbuf, &timeshare_coex))
                return -EINVAL;
 
        ret = mwifiex_send_cmd(priv, HostCmd_CMD_ROBUST_COEX,
index 63f861e6b28af3a4b808333104b8255ca40ee352..b95886e1413ee750f575251511cc1ff6300076af 100644 (file)
@@ -10,6 +10,7 @@
 
 #include <linux/completion.h>
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/semaphore.h>