linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/30] Remove strtobool()
@ 2022-11-01 21:05 Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool() Christophe JAILLET
                   ` (31 more replies)
  0 siblings, 32 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:05 UTC (permalink / raw)
  To: akpm, andriy.shevchenko, senozhatsky, wangkefeng.wang, axboe,
	kbusch, sfr, mark.rutland
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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>)


Each patch can be applied independently from the other ones.
The last patch of the serie removes the definition of strtobool().

All patches have been compile tested, except the ones against
arm64, s390 and irq-gic.


Finally, this gives the opportunity to remove some <linux/kernel.h> from
a few drivers. This will be addressed later when/if the serie is applied.


Christophe JAILLET (30):
  net: usb: Use kstrtobool() instead of strtobool()
  wifi: Use kstrtobool() instead of strtobool()
  irqchip: Use kstrtobool() instead of strtobool()
  scsi: target: Use kstrtobool() instead of strtobool()
  nvdimm: Use kstrtobool() instead of strtobool()
  nvme: Use kstrtobool() instead of strtobool()
  usb: core: Use kstrtobool() instead of strtobool()
  usb: gadget: Use kstrtobool() instead of strtobool()
  ACPI: sysfs: Use kstrtobool() instead of strtobool()
  clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of
    strtobool()
  greybus: svc: Use kstrtobool() instead of strtobool()
  input: Use kstrtobool() instead of strtobool()
  platform/chrome: Use kstrtobool() instead of strtobool()
  powercap: Use kstrtobool() instead of strtobool()
  video: fbdev: omapfb: Use kstrtobool() instead of strtobool()
  cifs: Use kstrtobool() instead of strtobool()
  initramfs: Use kstrtobool() instead of strtobool()
  module: Use kstrtobool() instead of strtobool()
  kernel/params.c: Use kstrtobool() instead of strtobool()
  mm/damon: Use kstrtobool() instead of strtobool()
  mm: Use kstrtobool() instead of strtobool()
  Bluetooth: hci_debugfs:: Use kstrtobool() instead of strtobool()
  test_firmware: Use kstrtobool() instead of strtobool()
  arm64: cpufeature: Use kstrtobool() instead of strtobool()
  KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool()
  s390/ipl: Use kstrtobool() instead of strtobool()
  KVM: x86/mmu: Use kstrtobool() instead of strtobool()
  x86/xen: Use kstrtobool() instead of strtobool()
  driver core: Use kstrtobool() instead of strtobool()
  kstrtox: Remove strtobool()

 arch/arm64/kernel/cpufeature.c                |  5 ++--
 arch/arm64/kvm/vgic/vgic-v3.c                 |  9 +++---
 arch/s390/kernel/ipl.c                        |  7 +++--
 arch/x86/kvm/mmu/mmu.c                        |  3 +-
 arch/x86/xen/enlighten_pv.c                   |  3 +-
 arch/x86/xen/setup.c                          |  3 +-
 drivers/acpi/sysfs.c                          |  3 +-
 drivers/base/core.c                           |  7 +++--
 drivers/clocksource/arm_arch_timer.c          |  3 +-
 drivers/greybus/svc.c                         |  3 +-
 drivers/input/input.c                         |  3 +-
 drivers/irqchip/irq-gic-v3.c                  |  3 +-
 drivers/irqchip/irq-gic.c                     |  3 +-
 drivers/net/usb/cdc_ncm.c                     |  3 +-
 drivers/net/usb/qmi_wwan.c                    |  5 ++--
 drivers/net/wireless/ath/ath10k/debug.c       |  5 ++--
 drivers/net/wireless/ath/ath9k/ath9k.h        |  1 +
 drivers/net/wireless/ath/ath9k/tx99.c         |  2 +-
 .../net/wireless/marvell/mwifiex/debugfs.c    |  2 +-
 drivers/net/wireless/marvell/mwifiex/main.h   |  1 +
 drivers/nvdimm/namespace_devs.c               |  3 +-
 drivers/nvdimm/pmem.c                         |  3 +-
 drivers/nvdimm/region_devs.c                  |  5 ++--
 drivers/nvme/host/pci.c                       |  3 +-
 drivers/nvme/target/configfs.c                | 17 ++++++-----
 drivers/platform/chrome/cros_ec_lightbar.c    |  3 +-
 drivers/powercap/powercap_sys.c               |  3 +-
 drivers/target/target_core_configfs.c         | 29 ++++++++++---------
 drivers/target/target_core_fabric_configfs.c  |  3 +-
 drivers/usb/core/port.c                       |  3 +-
 drivers/usb/core/sysfs.c                      |  7 +++--
 drivers/usb/gadget/configfs.c                 |  3 +-
 drivers/usb/gadget/function/f_mass_storage.c  |  3 +-
 drivers/usb/gadget/function/storage_common.c  |  9 +++---
 drivers/usb/gadget/function/u_serial.c        |  3 +-
 drivers/usb/gadget/legacy/serial.c            |  3 +-
 .../fbdev/omap2/omapfb/dss/display-sysfs.c    |  7 +++--
 .../fbdev/omap2/omapfb/dss/manager-sysfs.c    |  7 +++--
 .../fbdev/omap2/omapfb/dss/overlay-sysfs.c    |  3 +-
 .../video/fbdev/omap2/omapfb/omapfb-sysfs.c   |  3 +-
 fs/cifs/cifs_debug.c                          |  5 ++--
 include/linux/kernel.h                        |  2 +-
 init/initramfs.c                              |  8 ++++-
 kernel/module/main.c                          |  3 +-
 kernel/params.c                               |  3 +-
 lib/test_firmware.c                           |  3 +-
 mm/damon/lru_sort.c                           |  3 +-
 mm/damon/reclaim.c                            |  3 +-
 mm/page_table_check.c                         |  3 +-
 mm/usercopy.c                                 |  3 +-
 net/bluetooth/hci_debugfs.c                   |  3 +-
 51 files changed, 143 insertions(+), 90 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 71+ messages in thread

* [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-02  3:27   ` Jakub Kicinski
  2022-11-01 21:13 ` [PATCH 02/30] wifi: " Christophe JAILLET
                   ` (30 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Oliver Neukum, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Bjørn Mork
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-usb, netdev

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/net/usb/cdc_ncm.c  | 3 ++-
 drivers/net/usb/qmi_wwan.c | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 8d5cbda33f66..6b5f24f28dd1 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -43,6 +43,7 @@
 #include <linux/ctype.h>
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
+#include <linux/kstrtox.h>
 #include <linux/workqueue.h>
 #include <linux/mii.h>
 #include <linux/crc32.h>
@@ -318,7 +319,7 @@ static ssize_t ndp_to_end_store(struct device *d,  struct device_attribute *attr
 	struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
 	bool enable;
 
-	if (strtobool(buf, &enable))
+	if (kstrtobool(buf, &enable))
 		return -EINVAL;
 
 	/* no change? */
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 26c34a7c21bd..30d733c81ed8 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -13,6 +13,7 @@
 #include <linux/ethtool.h>
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
+#include <linux/kstrtox.h>
 #include <linux/mii.h>
 #include <linux/rtnetlink.h>
 #include <linux/usb.h>
@@ -343,7 +344,7 @@ static ssize_t raw_ip_store(struct device *d,  struct device_attribute *attr, co
 	bool enable;
 	int ret;
 
-	if (strtobool(buf, &enable))
+	if (kstrtobool(buf, &enable))
 		return -EINVAL;
 
 	/* no change? */
@@ -492,7 +493,7 @@ static ssize_t pass_through_store(struct device *d,
 	struct qmi_wwan_state *info;
 	bool enable;
 
-	if (strtobool(buf, &enable))
+	if (kstrtobool(buf, &enable))
 		return -EINVAL;
 
 	info = (void *)&dev->data;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 02/30] wifi: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool() Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-08  7:39   ` Kalle Valo
  2022-11-01 21:13 ` [PATCH 03/30] irqchip: " Christophe JAILLET
                   ` (29 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Toke Høiland-Jørgensen, Amitkumar Karwar,
	Ganapathi Bhat, Sharvari Harisangam, Xinming Hu
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, ath10k,
	linux-wireless, netdev

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/net/wireless/ath/ath10k/debug.c        | 5 +++--
 drivers/net/wireless/ath/ath9k/ath9k.h         | 1 +
 drivers/net/wireless/ath/ath9k/tx99.c          | 2 +-
 drivers/net/wireless/marvell/mwifiex/debugfs.c | 2 +-
 drivers/net/wireless/marvell/mwifiex/main.h    | 1 +
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index c861e66ef6bc..b9aea1510f7b 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -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);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 3ccf8cfc6b63..2cc23605c9fc 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -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>
diff --git a/drivers/net/wireless/ath/ath9k/tx99.c b/drivers/net/wireless/ath/ath9k/tx99.c
index 95544ce05acf..8a996ed9a3be 100644
--- a/drivers/net/wireless/ath/ath9k/tx99.c
+++ b/drivers/net/wireless/ath/ath9k/tx99.c
@@ -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);
diff --git a/drivers/net/wireless/marvell/mwifiex/debugfs.c b/drivers/net/wireless/marvell/mwifiex/debugfs.c
index bda53cb91f37..52b18f4a774b 100644
--- a/drivers/net/wireless/marvell/mwifiex/debugfs.c
+++ b/drivers/net/wireless/marvell/mwifiex/debugfs.c
@@ -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,
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
index 63f861e6b28a..b95886e1413e 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.h
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
@@ -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>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 03/30] irqchip: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool() Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 02/30] wifi: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-26 12:46   ` Marc Zyngier
  2022-11-01 21:13 ` [PATCH 04/30] scsi: target: " Christophe JAILLET
                   ` (28 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Thomas Gleixner, Marc Zyngier
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].


This patch has NOT been compile tested.


[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/irqchip/irq-gic-v3.c | 3 ++-
 drivers/irqchip/irq-gic.c    | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 34d58567b78d..997104d4338e 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/irqdomain.h>
+#include <linux/kstrtox.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
@@ -1171,7 +1172,7 @@ static bool gicv3_nolpi;
 
 static int __init gicv3_nolpi_cfg(char *buf)
 {
-	return strtobool(buf, &gicv3_nolpi);
+	return kstrtobool(buf, &gicv3_nolpi);
 }
 early_param("irqchip.gicv3_nolpi", gicv3_nolpi_cfg);
 
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 4c7bae0ec8f9..799f86d84b43 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -19,6 +19,7 @@
  */
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/list.h>
@@ -1332,7 +1333,7 @@ static bool gicv2_force_probe;
 
 static int __init gicv2_force_probe_cfg(char *buf)
 {
-	return strtobool(buf, &gicv2_force_probe);
+	return kstrtobool(buf, &gicv2_force_probe);
 }
 early_param("irqchip.gicv2_force_probe", gicv2_force_probe_cfg);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (2 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 03/30] irqchip: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-02  5:54   ` Chaitanya Kulkarni
                     ` (2 more replies)
  2022-11-01 21:13 ` [PATCH 05/30] nvdimm: " Christophe JAILLET
                   ` (27 subsequent siblings)
  31 siblings, 3 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-scsi,
	target-devel

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/target/target_core_configfs.c        | 29 ++++++++++----------
 drivers/target/target_core_fabric_configfs.c |  3 +-
 2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 533524299ed6..b8a5c8d6cfde 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -12,6 +12,7 @@
  *
  ****************************************************************************/
 
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <generated/utsrelease.h>
@@ -578,7 +579,7 @@ static ssize_t _name##_store(struct config_item *item, const char *page,	\
 	bool flag;							\
 	int ret;							\
 									\
-	ret = strtobool(page, &flag);					\
+	ret = kstrtobool(page, &flag);					\
 	if (ret < 0)							\
 		return ret;						\
 	da->_name = flag;						\
@@ -638,7 +639,7 @@ static ssize_t emulate_model_alias_store(struct config_item *item,
 		return -EINVAL;
 	}
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -660,7 +661,7 @@ static ssize_t emulate_write_cache_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -712,7 +713,7 @@ static ssize_t emulate_tas_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -737,7 +738,7 @@ static ssize_t emulate_tpu_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -767,7 +768,7 @@ static ssize_t emulate_tpws_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -866,7 +867,7 @@ static ssize_t pi_prot_format_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -903,7 +904,7 @@ static ssize_t pi_prot_verify_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -932,7 +933,7 @@ static ssize_t force_pr_aptpl_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 	if (da->da_dev->export_count) {
@@ -954,7 +955,7 @@ static ssize_t emulate_rest_reord_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -977,7 +978,7 @@ static ssize_t unmap_zeroes_data_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -1126,7 +1127,7 @@ static ssize_t alua_support_store(struct config_item *item,
 	bool flag, oldflag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -1165,7 +1166,7 @@ static ssize_t pgr_support_store(struct config_item *item,
 	bool flag, oldflag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
@@ -1194,7 +1195,7 @@ static ssize_t emulate_rsoc_store(struct config_item *item,
 	bool flag;
 	int ret;
 
-	ret = strtobool(page, &flag);
+	ret = kstrtobool(page, &flag);
 	if (ret < 0)
 		return ret;
 
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
index 95a88f6224cd..67b18a67317a 100644
--- a/drivers/target/target_core_fabric_configfs.c
+++ b/drivers/target/target_core_fabric_configfs.c
@@ -11,6 +11,7 @@
 *
  ****************************************************************************/
 
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/utsname.h>
@@ -829,7 +830,7 @@ static ssize_t target_fabric_tpg_base_enable_store(struct config_item *item,
 	int ret;
 	bool op;
 
-	ret = strtobool(page, &op);
+	ret = kstrtobool(page, &op);
 	if (ret)
 		return ret;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 05/30] nvdimm: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (3 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 04/30] scsi: target: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 06/30] nvme: " Christophe JAILLET
                   ` (26 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Dan Williams, Vishal Verma, Dave Jiang, Ira Weiny
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, nvdimm

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/nvdimm/namespace_devs.c | 3 ++-
 drivers/nvdimm/pmem.c           | 3 ++-
 drivers/nvdimm/region_devs.c    | 5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index c60ec0b373c5..07177eadc56e 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -2,6 +2,7 @@
 /*
  * Copyright(c) 2013-2015 Intel Corporation. All rights reserved.
  */
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/sort.h>
@@ -1338,7 +1339,7 @@ static ssize_t force_raw_store(struct device *dev,
 		struct device_attribute *attr, const char *buf, size_t len)
 {
 	bool force_raw;
-	int rc = strtobool(buf, &force_raw);
+	int rc = kstrtobool(buf, &force_raw);
 
 	if (rc)
 		return rc;
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 3c63dc2cdc81..46475d146f64 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -17,6 +17,7 @@
 #include <linux/moduleparam.h>
 #include <linux/badblocks.h>
 #include <linux/memremap.h>
+#include <linux/kstrtox.h>
 #include <linux/vmalloc.h>
 #include <linux/blk-mq.h>
 #include <linux/pfn_t.h>
@@ -408,7 +409,7 @@ static ssize_t write_cache_store(struct device *dev,
 	bool write_cache;
 	int rc;
 
-	rc = strtobool(buf, &write_cache);
+	rc = kstrtobool(buf, &write_cache);
 	if (rc)
 		return rc;
 	dax_write_cache(pmem->dax_dev, write_cache);
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index e0875d369762..76e1ae6f830a 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -5,6 +5,7 @@
 #include <linux/scatterlist.h>
 #include <linux/memregion.h>
 #include <linux/highmem.h>
+#include <linux/kstrtox.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/hash.h>
@@ -229,7 +230,7 @@ static ssize_t deep_flush_store(struct device *dev, struct device_attribute *att
 		const char *buf, size_t len)
 {
 	bool flush;
-	int rc = strtobool(buf, &flush);
+	int rc = kstrtobool(buf, &flush);
 	struct nd_region *nd_region = to_nd_region(dev);
 
 	if (rc)
@@ -484,7 +485,7 @@ static ssize_t read_only_store(struct device *dev,
 		struct device_attribute *attr, const char *buf, size_t len)
 {
 	bool ro;
-	int rc = strtobool(buf, &ro);
+	int rc = kstrtobool(buf, &ro);
 	struct nd_region *nd_region = to_nd_region(dev);
 
 	if (rc)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (4 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 05/30] nvdimm: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-02  5:52   ` Chaitanya Kulkarni
  2022-11-02  6:47   ` Christoph Hellwig
  2022-11-01 21:13 ` [PATCH 07/30] usb: core: " Christophe JAILLET
                   ` (25 subsequent siblings)
  31 siblings, 2 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Chaitanya Kulkarni
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-nvme

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/nvme/host/pci.c        |  3 ++-
 drivers/nvme/target/configfs.c | 17 +++++++++--------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 5f1d71ac0086..7c83dfd1bca6 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/io.h>
+#include <linux/kstrtox.h>
 #include <linux/memremap.h>
 #include <linux/mm.h>
 #include <linux/module.h>
@@ -2186,7 +2187,7 @@ static ssize_t hmb_store(struct device *dev, struct device_attribute *attr,
 	bool new;
 	int ret;
 
-	if (strtobool(buf, &new) < 0)
+	if (kstrtobool(buf, &new) < 0)
 		return -EINVAL;
 
 	if (new == ndev->hmb)
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index 9443ee1d4ae3..3eb8bdd4d464 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -4,6 +4,7 @@
  * Copyright (c) 2015-2016 HGST, a Western Digital Company.
  */
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#include <linux/kstrtox.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/slab.h>
@@ -267,7 +268,7 @@ static ssize_t nvmet_param_pi_enable_store(struct config_item *item,
 	struct nvmet_port *port = to_nvmet_port(item);
 	bool val;
 
-	if (strtobool(page, &val))
+	if (kstrtobool(page, &val))
 		return -EINVAL;
 
 	if (nvmet_is_port_enabled(port, __func__))
@@ -532,7 +533,7 @@ static ssize_t nvmet_ns_enable_store(struct config_item *item,
 	bool enable;
 	int ret = 0;
 
-	if (strtobool(page, &enable))
+	if (kstrtobool(page, &enable))
 		return -EINVAL;
 
 	if (enable)
@@ -556,7 +557,7 @@ static ssize_t nvmet_ns_buffered_io_store(struct config_item *item,
 	struct nvmet_ns *ns = to_nvmet_ns(item);
 	bool val;
 
-	if (strtobool(page, &val))
+	if (kstrtobool(page, &val))
 		return -EINVAL;
 
 	mutex_lock(&ns->subsys->lock);
@@ -579,7 +580,7 @@ static ssize_t nvmet_ns_revalidate_size_store(struct config_item *item,
 	struct nvmet_ns *ns = to_nvmet_ns(item);
 	bool val;
 
-	if (strtobool(page, &val))
+	if (kstrtobool(page, &val))
 		return -EINVAL;
 
 	if (!val)
@@ -728,7 +729,7 @@ static ssize_t nvmet_passthru_enable_store(struct config_item *item,
 	bool enable;
 	int ret = 0;
 
-	if (strtobool(page, &enable))
+	if (kstrtobool(page, &enable))
 		return -EINVAL;
 
 	if (enable)
@@ -995,7 +996,7 @@ static ssize_t nvmet_subsys_attr_allow_any_host_store(struct config_item *item,
 	bool allow_any_host;
 	int ret = 0;
 
-	if (strtobool(page, &allow_any_host))
+	if (kstrtobool(page, &allow_any_host))
 		return -EINVAL;
 
 	down_write(&nvmet_config_sem);
@@ -1272,7 +1273,7 @@ static ssize_t nvmet_subsys_attr_pi_enable_store(struct config_item *item,
 	struct nvmet_subsys *subsys = to_subsys(item);
 	bool pi_enable;
 
-	if (strtobool(page, &pi_enable))
+	if (kstrtobool(page, &pi_enable))
 		return -EINVAL;
 
 	subsys->pi_support = pi_enable;
@@ -1392,7 +1393,7 @@ static ssize_t nvmet_referral_enable_store(struct config_item *item,
 	struct nvmet_port *port = to_nvmet_port(item);
 	bool enable;
 
-	if (strtobool(page, &enable))
+	if (kstrtobool(page, &enable))
 		goto inval;
 
 	if (enable)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 07/30] usb: core: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (5 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 06/30] nvme: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 08/30] usb: gadget: " Christophe JAILLET
                   ` (24 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-usb

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/usb/core/port.c  | 3 ++-
 drivers/usb/core/sysfs.c | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/port.c b/drivers/usb/core/port.c
index 38c1a4f4fdea..015204fc67a1 100644
--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -7,6 +7,7 @@
  * Author: Lan Tianyu <tianyu.lan@intel.com>
  */
 
+#include <linux/kstrtox.h>
 #include <linux/slab.h>
 #include <linux/pm_qos.h>
 #include <linux/component.h>
@@ -63,7 +64,7 @@ static ssize_t disable_store(struct device *dev, struct device_attribute *attr,
 	bool disabled;
 	int rc;
 
-	rc = strtobool(buf, &disabled);
+	rc = kstrtobool(buf, &disabled);
 	if (rc)
 		return rc;
 
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index 631574718d8a..8217032dfb85 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -13,6 +13,7 @@
 
 
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/string.h>
 #include <linux/usb.h>
 #include <linux/usb/hcd.h>
@@ -505,7 +506,7 @@ static ssize_t usb2_hardware_lpm_store(struct device *dev,
 	if (ret < 0)
 		return -EINTR;
 
-	ret = strtobool(buf, &value);
+	ret = kstrtobool(buf, &value);
 
 	if (!ret) {
 		udev->usb2_hw_lpm_allowed = value;
@@ -975,7 +976,7 @@ static ssize_t interface_authorized_default_store(struct device *dev,
 	int rc = count;
 	bool val;
 
-	if (strtobool(buf, &val) != 0)
+	if (kstrtobool(buf, &val) != 0)
 		return -EINVAL;
 
 	if (val)
@@ -1176,7 +1177,7 @@ static ssize_t interface_authorized_store(struct device *dev,
 	struct usb_interface *intf = to_usb_interface(dev);
 	bool val;
 
-	if (strtobool(buf, &val) != 0)
+	if (kstrtobool(buf, &val) != 0)
 		return -EINVAL;
 
 	if (val)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 08/30] usb: gadget: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (6 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 07/30] usb: core: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-01 21:13 ` [PATCH 09/30] ACPI: sysfs: " Christophe JAILLET
                   ` (23 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-usb

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/usb/gadget/configfs.c                | 3 ++-
 drivers/usb/gadget/function/f_mass_storage.c | 3 ++-
 drivers/usb/gadget/function/storage_common.c | 9 +++++----
 drivers/usb/gadget/function/u_serial.c       | 3 ++-
 drivers/usb/gadget/legacy/serial.c           | 3 ++-
 5 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 3a6b4926193e..96121d1c8df4 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -3,6 +3,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/device.h>
+#include <linux/kstrtox.h>
 #include <linux/nls.h>
 #include <linux/usb/composite.h>
 #include <linux/usb/gadget_configfs.h>
@@ -800,7 +801,7 @@ static ssize_t os_desc_use_store(struct config_item *item, const char *page,
 	bool use;
 
 	mutex_lock(&gi->lock);
-	ret = strtobool(page, &use);
+	ret = kstrtobool(page, &use);
 	if (!ret) {
 		gi->use_os_desc = use;
 		ret = len;
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 3abf7f586e2a..3a30feb47073 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -176,6 +176,7 @@
 #include <linux/fcntl.h>
 #include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/kstrtox.h>
 #include <linux/kthread.h>
 #include <linux/sched/signal.h>
 #include <linux/limits.h>
@@ -3387,7 +3388,7 @@ static ssize_t fsg_opts_stall_store(struct config_item *item, const char *page,
 		return -EBUSY;
 	}
 
-	ret = strtobool(page, &stall);
+	ret = kstrtobool(page, &stall);
 	if (!ret) {
 		opts->common->can_stall = stall;
 		ret = len;
diff --git a/drivers/usb/gadget/function/storage_common.c b/drivers/usb/gadget/function/storage_common.c
index 208c6a92780a..2a4163b0f6fe 100644
--- a/drivers/usb/gadget/function/storage_common.c
+++ b/drivers/usb/gadget/function/storage_common.c
@@ -23,6 +23,7 @@
 #include <linux/blkdev.h>
 #include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/kstrtox.h>
 #include <linux/usb/composite.h>
 
 #include "storage_common.h"
@@ -396,7 +397,7 @@ ssize_t fsg_store_ro(struct fsg_lun *curlun, struct rw_semaphore *filesem,
 	ssize_t		rc;
 	bool		ro;
 
-	rc = strtobool(buf, &ro);
+	rc = kstrtobool(buf, &ro);
 	if (rc)
 		return rc;
 
@@ -419,7 +420,7 @@ ssize_t fsg_store_nofua(struct fsg_lun *curlun, const char *buf, size_t count)
 	bool		nofua;
 	int		ret;
 
-	ret = strtobool(buf, &nofua);
+	ret = kstrtobool(buf, &nofua);
 	if (ret)
 		return ret;
 
@@ -470,7 +471,7 @@ ssize_t fsg_store_cdrom(struct fsg_lun *curlun, struct rw_semaphore *filesem,
 	bool		cdrom;
 	int		ret;
 
-	ret = strtobool(buf, &cdrom);
+	ret = kstrtobool(buf, &cdrom);
 	if (ret)
 		return ret;
 
@@ -493,7 +494,7 @@ ssize_t fsg_store_removable(struct fsg_lun *curlun, const char *buf,
 	bool		removable;
 	int		ret;
 
-	ret = strtobool(buf, &removable);
+	ret = kstrtobool(buf, &removable);
 	if (ret)
 		return ret;
 
diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index 7538279f9817..840626e064e1 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -24,6 +24,7 @@
 #include <linux/export.h>
 #include <linux/module.h>
 #include <linux/console.h>
+#include <linux/kstrtox.h>
 #include <linux/kthread.h>
 #include <linux/workqueue.h>
 #include <linux/kfifo.h>
@@ -1070,7 +1071,7 @@ ssize_t gserial_set_console(unsigned char port_num, const char *page, size_t cou
 	bool enable;
 	int ret;
 
-	ret = strtobool(page, &enable);
+	ret = kstrtobool(page, &enable);
 	if (ret)
 		return ret;
 
diff --git a/drivers/usb/gadget/legacy/serial.c b/drivers/usb/gadget/legacy/serial.c
index dcd3a6603d90..4974bee6049a 100644
--- a/drivers/usb/gadget/legacy/serial.c
+++ b/drivers/usb/gadget/legacy/serial.c
@@ -9,6 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/device.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
@@ -109,7 +110,7 @@ static int enable_set(const char *s, const struct kernel_param *kp)
 	if (!s)	/* called for no-arg enable == default */
 		return 0;
 
-	ret = strtobool(s, &do_enable);
+	ret = kstrtobool(s, &do_enable);
 	if (ret || enable == do_enable)
 		return ret;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 09/30] ACPI: sysfs: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (7 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 08/30] usb: gadget: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-02 11:33   ` Andy Shevchenko
  2022-11-01 21:13 ` [PATCH 10/30] clocksource/drivers/arm_arch_timer: " Christophe JAILLET
                   ` (22 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-acpi

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/acpi/sysfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
index cc2fe0618178..2d81c742e4d2 100644
--- a/drivers/acpi/sysfs.c
+++ b/drivers/acpi/sysfs.c
@@ -9,6 +9,7 @@
 #include <linux/bitmap.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/moduleparam.h>
 
 #include "internal.h"
@@ -992,7 +993,7 @@ static ssize_t force_remove_store(struct kobject *kobj,
 	bool val;
 	int ret;
 
-	ret = strtobool(buf, &val);
+	ret = kstrtobool(buf, &val);
 	if (ret < 0)
 		return ret;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (8 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 09/30] ACPI: sysfs: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-02 10:56   ` Mark Rutland
  2022-12-02 12:17   ` Daniel Lezcano
  2022-11-01 21:13 ` [PATCH 11/30] greybus: svc: " Christophe JAILLET
                   ` (21 subsequent siblings)
  31 siblings, 2 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Mark Rutland, Marc Zyngier, Daniel Lezcano, Thomas Gleixner
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-arm-kernel

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/clocksource/arm_arch_timer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index a7ff77550e17..1af045b231fd 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -18,6 +18,7 @@
 #include <linux/clocksource.h>
 #include <linux/clocksource_ids.h>
 #include <linux/interrupt.h>
+#include <linux/kstrtox.h>
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
 #include <linux/io.h>
@@ -97,7 +98,7 @@ static bool evtstrm_enable __ro_after_init = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EV
 
 static int __init early_evtstrm_cfg(char *buf)
 {
-	return strtobool(buf, &evtstrm_enable);
+	return kstrtobool(buf, &evtstrm_enable);
 }
 early_param("clocksource.arm_arch_timer.evtstrm", early_evtstrm_cfg);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 11/30] greybus: svc: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (9 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 10/30] clocksource/drivers/arm_arch_timer: " Christophe JAILLET
@ 2022-11-01 21:13 ` Christophe JAILLET
  2022-11-01 21:49   ` Alex Elder
  2022-11-02  7:31   ` Johan Hovold
  2022-11-01 21:14 ` [PATCH 12/30] input: " Christophe JAILLET
                   ` (20 subsequent siblings)
  31 siblings, 2 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:13 UTC (permalink / raw)
  To: Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, greybus-dev

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/greybus/svc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
index 56d2b44d6fef..16cced80867a 100644
--- a/drivers/greybus/svc.c
+++ b/drivers/greybus/svc.c
@@ -7,6 +7,7 @@
  */
 
 #include <linux/debugfs.h>
+#include <linux/kstrtox.h>
 #include <linux/workqueue.h>
 #include <linux/greybus.h>
 
@@ -83,7 +84,7 @@ static ssize_t watchdog_store(struct device *dev,
 	int retval;
 	bool user_request;
 
-	retval = strtobool(buf, &user_request);
+	retval = kstrtobool(buf, &user_request);
 	if (retval)
 		return retval;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (10 preceding siblings ...)
  2022-11-01 21:13 ` [PATCH 11/30] greybus: svc: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-03 20:46   ` Dmitry Torokhov
  2022-11-01 21:14 ` [PATCH 13/30] platform/chrome: " Christophe JAILLET
                   ` (19 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-input

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/input/input.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/input/input.c b/drivers/input/input.c
index ebb2b7f0f8ff..783961df3626 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -21,6 +21,7 @@
 #include <linux/seq_file.h>
 #include <linux/poll.h>
 #include <linux/device.h>
+#include <linux/kstrtox.h>
 #include <linux/mutex.h>
 #include <linux/rcupdate.h>
 #include "input-compat.h"
@@ -1465,7 +1466,7 @@ static ssize_t inhibited_store(struct device *dev,
 	ssize_t rv;
 	bool inhibited;
 
-	if (strtobool(buf, &inhibited))
+	if (kstrtobool(buf, &inhibited))
 		return -EINVAL;
 
 	if (inhibited)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 13/30] platform/chrome: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (11 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 12/30] input: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-02  4:30   ` patchwork-bot+chrome-platform
  2022-11-02 12:30   ` patchwork-bot+chrome-platform
  2022-11-01 21:14 ` [PATCH 14/30] powercap: " Christophe JAILLET
                   ` (18 subsequent siblings)
  31 siblings, 2 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Benson Leung, Guenter Roeck
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, chrome-platform

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/platform/chrome/cros_ec_lightbar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platform/chrome/cros_ec_lightbar.c
index 469dfc7a4a03..58beb2a047b2 100644
--- a/drivers/platform/chrome/cros_ec_lightbar.c
+++ b/drivers/platform/chrome/cros_ec_lightbar.c
@@ -8,6 +8,7 @@
 #include <linux/device.h>
 #include <linux/fs.h>
 #include <linux/kobject.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/platform_data/cros_ec_commands.h>
 #include <linux/platform_data/cros_ec_proto.h>
@@ -493,7 +494,7 @@ static ssize_t userspace_control_store(struct device *dev,
 	bool enable;
 	int ret;
 
-	ret = strtobool(buf, &enable);
+	ret = kstrtobool(buf, &enable);
 	if (ret < 0)
 		return ret;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 14/30] powercap: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (12 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 13/30] platform/chrome: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-03 18:39   ` Rafael J. Wysocki
  2022-11-01 21:14 ` [PATCH 15/30] video: fbdev: omapfb: " Christophe JAILLET
                   ` (17 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-pm

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/powercap/powercap_sys.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
index f0654a932b37..1f968353d479 100644
--- a/drivers/powercap/powercap_sys.c
+++ b/drivers/powercap/powercap_sys.c
@@ -7,6 +7,7 @@
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/err.h>
+#include <linux/kstrtox.h>
 #include <linux/slab.h>
 #include <linux/powercap.h>
 
@@ -446,7 +447,7 @@ static ssize_t enabled_store(struct device *dev,
 {
 	bool mode;
 
-	if (strtobool(buf, &mode))
+	if (kstrtobool(buf, &mode))
 		return -EINVAL;
 	if (dev->parent) {
 		struct powercap_zone *power_zone = to_powercap_zone(dev);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 15/30] video: fbdev: omapfb: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (13 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 14/30] powercap: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 16/30] cifs: " Christophe JAILLET
                   ` (16 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Helge Deller
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-omap,
	linux-fbdev, dri-devel

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c | 7 ++++---
 drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c | 7 ++++---
 drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c | 3 ++-
 drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c      | 3 ++-
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c
index bc5a44c2a144..ae937854403b 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c
@@ -10,6 +10,7 @@
 #define DSS_SUBSYS_NAME "DISPLAY"
 
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/sysfs.h>
@@ -36,7 +37,7 @@ static ssize_t display_enabled_store(struct omap_dss_device *dssdev,
 	int r;
 	bool enable;
 
-	r = strtobool(buf, &enable);
+	r = kstrtobool(buf, &enable);
 	if (r)
 		return r;
 
@@ -73,7 +74,7 @@ static ssize_t display_tear_store(struct omap_dss_device *dssdev,
 	if (!dssdev->driver->enable_te || !dssdev->driver->get_te)
 		return -ENOENT;
 
-	r = strtobool(buf, &te);
+	r = kstrtobool(buf, &te);
 	if (r)
 		return r;
 
@@ -183,7 +184,7 @@ static ssize_t display_mirror_store(struct omap_dss_device *dssdev,
 	if (!dssdev->driver->set_mirror || !dssdev->driver->get_mirror)
 		return -ENOENT;
 
-	r = strtobool(buf, &mirror);
+	r = kstrtobool(buf, &mirror);
 	if (r)
 		return r;
 
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c
index ba21c4a2633d..1b644be5fe2e 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c
@@ -10,6 +10,7 @@
 #define DSS_SUBSYS_NAME "MANAGER"
 
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
@@ -246,7 +247,7 @@ static ssize_t manager_trans_key_enabled_store(struct omap_overlay_manager *mgr,
 	bool enable;
 	int r;
 
-	r = strtobool(buf, &enable);
+	r = kstrtobool(buf, &enable);
 	if (r)
 		return r;
 
@@ -290,7 +291,7 @@ static ssize_t manager_alpha_blending_enabled_store(
 	if(!dss_has_feature(FEAT_ALPHA_FIXED_ZORDER))
 		return -ENODEV;
 
-	r = strtobool(buf, &enable);
+	r = kstrtobool(buf, &enable);
 	if (r)
 		return r;
 
@@ -329,7 +330,7 @@ static ssize_t manager_cpr_enable_store(struct omap_overlay_manager *mgr,
 	if (!dss_has_feature(FEAT_CPR))
 		return -ENODEV;
 
-	r = strtobool(buf, &enable);
+	r = kstrtobool(buf, &enable);
 	if (r)
 		return r;
 
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c
index 601c0beb6de9..1da4fb1c77b4 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c
@@ -13,6 +13,7 @@
 #include <linux/err.h>
 #include <linux/sysfs.h>
 #include <linux/kobject.h>
+#include <linux/kstrtox.h>
 #include <linux/platform_device.h>
 
 #include <video/omapfb_dss.h>
@@ -210,7 +211,7 @@ static ssize_t overlay_enabled_store(struct omap_overlay *ovl, const char *buf,
 	int r;
 	bool enable;
 
-	r = strtobool(buf, &enable);
+	r = kstrtobool(buf, &enable);
 	if (r)
 		return r;
 
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c
index 06dc41aa0354..831b2c2fbdf9 100644
--- a/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c
+++ b/drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c
@@ -15,6 +15,7 @@
 #include <linux/uaccess.h>
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/mm.h>
 #include <linux/omapfb.h>
 
@@ -96,7 +97,7 @@ static ssize_t store_mirror(struct device *dev,
 	int r;
 	struct fb_var_screeninfo new_var;
 
-	r = strtobool(buf, &mirror);
+	r = kstrtobool(buf, &mirror);
 	if (r)
 		return r;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 16/30] cifs: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (14 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 15/30] video: fbdev: omapfb: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 17/30] initramfs: " Christophe JAILLET
                   ` (15 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Steve French, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N,
	Tom Talpey
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-cifs,
	samba-technical

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 fs/cifs/cifs_debug.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index 90850da390ae..4f1b3a65e74c 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -8,6 +8,7 @@
 #include <linux/fs.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/uaccess.h>
@@ -779,7 +780,7 @@ static ssize_t cifsFYI_proc_write(struct file *file, const char __user *buffer,
 	rc = get_user(c[0], buffer);
 	if (rc)
 		return rc;
-	if (strtobool(c, &bv) == 0)
+	if (kstrtobool(c, &bv) == 0)
 		cifsFYI = bv;
 	else if ((c[0] > '1') && (c[0] <= '9'))
 		cifsFYI = (int) (c[0] - '0'); /* see cifs_debug.h for meanings */
@@ -939,7 +940,7 @@ static ssize_t cifs_security_flags_proc_write(struct file *file,
 
 	if (count < 3) {
 		/* single char or single char followed by null */
-		if (strtobool(flags_string, &bv) == 0) {
+		if (kstrtobool(flags_string, &bv) == 0) {
 			global_secflags = bv ? CIFSSEC_MAX : CIFSSEC_DEF;
 			return count;
 		} else if (!isdigit(flags_string[0])) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 17/30] initramfs: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (15 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 16/30] cifs: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 18/30] module: " Christophe JAILLET
                   ` (14 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 init/initramfs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/init/initramfs.c b/init/initramfs.c
index 62321883fe61..174e15236c8e 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -11,6 +11,7 @@
 #include <linux/syscalls.h>
 #include <linux/utime.h>
 #include <linux/file.h>
+#include <linux/kstrtox.h>
 #include <linux/memblock.h>
 #include <linux/mm.h>
 #include <linux/namei.h>
@@ -571,7 +572,12 @@ __setup("keepinitrd", keepinitrd_setup);
 static bool __initdata initramfs_async = true;
 static int __init initramfs_async_setup(char *str)
 {
-	strtobool(str, &initramfs_async);
+	int ret;
+
+	ret = kstrtobool(str, &initramfs_async);
+	if (ret)
+		return 0;
+
 	return 1;
 }
 __setup("initramfs_async=", initramfs_async_setup);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (16 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 17/30] initramfs: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-02 18:41   ` Luis Chamberlain
                     ` (2 more replies)
  2022-11-01 21:14 ` [PATCH 19/30] kernel/params.c: " Christophe JAILLET
                   ` (13 subsequent siblings)
  31 siblings, 3 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-modules

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 kernel/module/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/module/main.c b/kernel/module/main.c
index ff2dfd1f548d..79e17522e196 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -17,6 +17,7 @@
 #include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/kernel_read_file.h>
+#include <linux/kstrtox.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
 #include <linux/elf.h>
@@ -2649,7 +2650,7 @@ static int unknown_module_param_cb(char *param, char *val, const char *modname,
 	int ret;
 
 	if (strcmp(param, "async_probe") == 0) {
-		if (strtobool(val, &mod->async_probe_requested))
+		if (kstrtobool(val, &mod->async_probe_requested))
 			mod->async_probe_requested = true;
 		return 0;
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 19/30] kernel/params.c: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (17 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 18/30] module: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 20/30] mm/damon: " Christophe JAILLET
                   ` (12 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

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

diff --git a/kernel/params.c b/kernel/params.c
index a06f80c56f19..96250d3e201b 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -4,6 +4,7 @@
 
 */
 #include <linux/kernel.h>
+#include <linux/kstrtox.h>
 #include <linux/string.h>
 #include <linux/errno.h>
 #include <linux/module.h>
@@ -310,7 +311,7 @@ int param_set_bool(const char *val, const struct kernel_param *kp)
 	if (!val) val = "1";
 
 	/* One of =[yYnN01] */
-	return strtobool(val, kp->arg);
+	return kstrtobool(val, kp->arg);
 }
 EXPORT_SYMBOL(param_set_bool);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 20/30] mm/damon: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (18 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 19/30] kernel/params.c: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 22:00   ` SeongJae Park
  2022-11-01 21:14 ` [PATCH 21/30] mm: " Christophe JAILLET
                   ` (11 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: SeongJae Park, Andrew Morton
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, damon, linux-mm

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 mm/damon/lru_sort.c | 3 ++-
 mm/damon/reclaim.c  | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index 2a532e3983df..7b8fce2f67a8 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -8,6 +8,7 @@
 #define pr_fmt(fmt) "damon-lru-sort: " fmt
 
 #include <linux/damon.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 
 #include "modules-common.h"
@@ -241,7 +242,7 @@ static int damon_lru_sort_enabled_store(const char *val,
 	bool enable;
 	int err;
 
-	err = strtobool(val, &enable);
+	err = kstrtobool(val, &enable);
 	if (err)
 		return err;
 
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index e57604bec06d..e82631f39481 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -8,6 +8,7 @@
 #define pr_fmt(fmt) "damon-reclaim: " fmt
 
 #include <linux/damon.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 
 #include "modules-common.h"
@@ -187,7 +188,7 @@ static int damon_reclaim_enabled_store(const char *val,
 	bool enable;
 	int err;
 
-	err = strtobool(val, &enable);
+	err = kstrtobool(val, &enable);
 	if (err)
 		return err;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (19 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 20/30] mm/damon: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 22:47   ` Kees Cook
  2022-11-05  2:58   ` Pasha Tatashin
  2022-11-01 21:14 ` [PATCH 22/30] Bluetooth: hci_debugfs: " Christophe JAILLET
                   ` (10 subsequent siblings)
  31 siblings, 2 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Pasha Tatashin, Andrew Morton, Kees Cook
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-mm,
	linux-hardening

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 mm/page_table_check.c | 3 ++-
 mm/usercopy.c         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/mm/page_table_check.c b/mm/page_table_check.c
index 433dbce13fe1..93e633c1d587 100644
--- a/mm/page_table_check.c
+++ b/mm/page_table_check.c
@@ -4,6 +4,7 @@
  * Copyright (c) 2021, Google LLC.
  * Pasha Tatashin <pasha.tatashin@soleen.com>
  */
+#include <linux/kstrtox.h>
 #include <linux/mm.h>
 #include <linux/page_table_check.h>
 
@@ -23,7 +24,7 @@ EXPORT_SYMBOL(page_table_check_disabled);
 
 static int __init early_page_table_check_param(char *buf)
 {
-	return strtobool(buf, &__page_table_check_enabled);
+	return kstrtobool(buf, &__page_table_check_enabled);
 }
 
 early_param("page_table_check", early_page_table_check_param);
diff --git a/mm/usercopy.c b/mm/usercopy.c
index c1ee15a98633..4c3164beacec 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -12,6 +12,7 @@
 
 #include <linux/mm.h>
 #include <linux/highmem.h>
+#include <linux/kstrtox.h>
 #include <linux/slab.h>
 #include <linux/sched.h>
 #include <linux/sched/task.h>
@@ -258,7 +259,7 @@ static bool enable_checks __initdata = true;
 
 static int __init parse_hardened_usercopy(char *str)
 {
-	if (strtobool(str, &enable_checks))
+	if (kstrtobool(str, &enable_checks))
 		pr_warn("Invalid option string for hardened_usercopy: '%s'\n",
 			str);
 	return 1;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 22/30] Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (20 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 21/30] mm: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 23/30] test_firmware: " Christophe JAILLET
                   ` (9 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
	linux-bluetooth, netdev

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 net/bluetooth/hci_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c
index b7f682922a16..f1ef60ddd4a6 100644
--- a/net/bluetooth/hci_debugfs.c
+++ b/net/bluetooth/hci_debugfs.c
@@ -22,6 +22,7 @@
 */
 
 #include <linux/debugfs.h>
+#include <linux/kstrtox.h>
 
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
@@ -1152,7 +1153,7 @@ static ssize_t force_no_mitm_write(struct file *file,
 		return -EFAULT;
 
 	buf[buf_size] = '\0';
-	if (strtobool(buf, &enable))
+	if (kstrtobool(buf, &enable))
 		return -EINVAL;
 
 	if (enable == hci_dev_test_flag(hdev, HCI_FORCE_NO_MITM))
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 23/30] test_firmware: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (21 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 22/30] Bluetooth: hci_debugfs: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 24/30] arm64: cpufeature: " Christophe JAILLET
                   ` (8 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 lib/test_firmware.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/test_firmware.c b/lib/test_firmware.c
index c82b65947ce6..b147dc687e92 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (22 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 23/30] test_firmware: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-02 13:46   ` Catalin Marinas
  2022-11-01 21:14 ` [PATCH 25/30] KVM: arm64: vgic-v3: " Christophe JAILLET
                   ` (7 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-arm-kernel

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].


This patch has NOT been compile tested.


[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 arch/arm64/kernel/cpufeature.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c
index 6062454a9067..271a142b96fa 100644
--- a/arch/arm64/kernel/cpufeature.c
+++ b/arch/arm64/kernel/cpufeature.c
@@ -65,6 +65,7 @@
 #include <linux/bsearch.h>
 #include <linux/cpumask.h>
 #include <linux/crash_dump.h>
+#include <linux/kstrtox.h>
 #include <linux/sort.h>
 #include <linux/stop_machine.h>
 #include <linux/sysfs.h>
@@ -1769,7 +1770,7 @@ kpti_install_ng_mappings(const struct arm64_cpu_capabilities *__unused)
 static int __init parse_kpti(char *str)
 {
 	bool enabled;
-	int ret = strtobool(str, &enabled);
+	int ret = kstrtobool(str, &enabled);
 
 	if (ret)
 		return ret;
@@ -2013,7 +2014,7 @@ static bool enable_pseudo_nmi;
 
 static int __init early_enable_pseudo_nmi(char *p)
 {
-	return strtobool(p, &enable_pseudo_nmi);
+	return kstrtobool(p, &enable_pseudo_nmi);
 }
 early_param("irqchip.gicv3_pseudo_nmi", early_enable_pseudo_nmi);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 25/30] KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (23 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 24/30] arm64: cpufeature: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 26/30] s390/ipl: " Christophe JAILLET
                   ` (6 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Marc Zyngier, James Morse, Alexandru Elisei, Suzuki K Poulose,
	Oliver Upton, Catalin Marinas, Will Deacon
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET,
	linux-arm-kernel, kvmarm, kvmarm

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].


This patch has NOT been compile tested.


[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 arch/arm64/kvm/vgic/vgic-v3.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c
index 826ff6f2a4e7..efb2726efbb3 100644
--- a/arch/arm64/kvm/vgic/vgic-v3.c
+++ b/arch/arm64/kvm/vgic/vgic-v3.c
@@ -3,6 +3,7 @@
 #include <linux/irqchip/arm-gic-v3.h>
 #include <linux/irq.h>
 #include <linux/irqdomain.h>
+#include <linux/kstrtox.h>
 #include <linux/kvm.h>
 #include <linux/kvm_host.h>
 #include <kvm/arm_vgic.h>
@@ -587,25 +588,25 @@ DEFINE_STATIC_KEY_FALSE(vgic_v3_cpuif_trap);
 
 static int __init early_group0_trap_cfg(char *buf)
 {
-	return strtobool(buf, &group0_trap);
+	return kstrtobool(buf, &group0_trap);
 }
 early_param("kvm-arm.vgic_v3_group0_trap", early_group0_trap_cfg);
 
 static int __init early_group1_trap_cfg(char *buf)
 {
-	return strtobool(buf, &group1_trap);
+	return kstrtobool(buf, &group1_trap);
 }
 early_param("kvm-arm.vgic_v3_group1_trap", early_group1_trap_cfg);
 
 static int __init early_common_trap_cfg(char *buf)
 {
-	return strtobool(buf, &common_trap);
+	return kstrtobool(buf, &common_trap);
 }
 early_param("kvm-arm.vgic_v3_common_trap", early_common_trap_cfg);
 
 static int __init early_gicv4_enable(char *buf)
 {
-	return strtobool(buf, &gicv4_enable);
+	return kstrtobool(buf, &gicv4_enable);
 }
 early_param("kvm-arm.vgic_v4_enable", early_gicv4_enable);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 26/30] s390/ipl: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (24 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 25/30] KVM: arm64: vgic-v3: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-08 14:53   ` Alexander Gordeev
  2022-11-01 21:14 ` [PATCH 27/30] KVM: x86/mmu: " Christophe JAILLET
                   ` (5 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-s390

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].


This patch has NOT been compile tested.


[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 arch/s390/kernel/ipl.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c
index 325cbf69ebbd..cdd575d7a91a 100644
--- a/arch/s390/kernel/ipl.c
+++ b/arch/s390/kernel/ipl.c
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/delay.h>
+#include <linux/kstrtox.h>
 #include <linux/panic_notifier.h>
 #include <linux/reboot.h>
 #include <linux/ctype.h>
@@ -779,7 +780,7 @@ static ssize_t reipl_fcp_clear_store(struct kobject *kobj,
 				     struct kobj_attribute *attr,
 				     const char *buf, size_t len)
 {
-	if (strtobool(buf, &reipl_fcp_clear) < 0)
+	if (kstrtobool(buf, &reipl_fcp_clear) < 0)
 		return -EINVAL;
 	return len;
 }
@@ -899,7 +900,7 @@ static ssize_t reipl_nvme_clear_store(struct kobject *kobj,
 				      struct kobj_attribute *attr,
 				      const char *buf, size_t len)
 {
-	if (strtobool(buf, &reipl_nvme_clear) < 0)
+	if (kstrtobool(buf, &reipl_nvme_clear) < 0)
 		return -EINVAL;
 	return len;
 }
@@ -952,7 +953,7 @@ static ssize_t reipl_ccw_clear_store(struct kobject *kobj,
 				     struct kobj_attribute *attr,
 				     const char *buf, size_t len)
 {
-	if (strtobool(buf, &reipl_ccw_clear) < 0)
+	if (kstrtobool(buf, &reipl_ccw_clear) < 0)
 		return -EINVAL;
 	return len;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 27/30] KVM: x86/mmu: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (25 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 26/30] s390/ipl: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 28/30] x86/xen: " Christophe JAILLET
                   ` (4 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, kvm

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]:  https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 arch/x86/kvm/mmu/mmu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 6f81539061d6..aa45abce7586 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -42,6 +42,7 @@
 #include <linux/uaccess.h>
 #include <linux/hash.h>
 #include <linux/kern_levels.h>
+#include <linux/kstrtox.h>
 #include <linux/kthread.h>
 
 #include <asm/page.h>
@@ -6641,7 +6642,7 @@ static int set_nx_huge_pages(const char *val, const struct kernel_param *kp)
 		new_val = 1;
 	else if (sysfs_streq(val, "auto"))
 		new_val = get_nx_auto_mode();
-	else if (strtobool(val, &new_val) < 0)
+	else if (kstrtobool(val, &new_val) < 0)
 		return -EINVAL;
 
 	__set_nx_huge_pages(new_val);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 28/30] x86/xen: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (26 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 27/30] KVM: x86/mmu: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 23:11   ` Boris Ostrovsky
  2022-11-01 21:14 ` [PATCH 29/30] driver core: " Christophe JAILLET
                   ` (3 subsequent siblings)
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, xen-devel

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 arch/x86/xen/enlighten_pv.c | 3 ++-
 arch/x86/xen/setup.c        | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/enlighten_pv.c b/arch/x86/xen/enlighten_pv.c
index 05170fc19083..9e1ac6a281e4 100644
--- a/arch/x86/xen/enlighten_pv.c
+++ b/arch/x86/xen/enlighten_pv.c
@@ -23,6 +23,7 @@
 #include <linux/start_kernel.h>
 #include <linux/sched.h>
 #include <linux/kprobes.h>
+#include <linux/kstrtox.h>
 #include <linux/memblock.h>
 #include <linux/export.h>
 #include <linux/mm.h>
@@ -113,7 +114,7 @@ static __read_mostly bool xen_msr_safe = IS_ENABLED(CONFIG_XEN_PV_MSR_SAFE);
 static int __init parse_xen_msr_safe(char *str)
 {
 	if (str)
-		return strtobool(str, &xen_msr_safe);
+		return kstrtobool(str, &xen_msr_safe);
 	return -EINVAL;
 }
 early_param("xen_msr_safe", parse_xen_msr_safe);
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index cfa99e8f054b..0abccdab5bc6 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -7,6 +7,7 @@
 
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/kstrtox.h>
 #include <linux/mm.h>
 #include <linux/pm.h>
 #include <linux/memblock.h>
@@ -85,7 +86,7 @@ static void __init xen_parse_512gb(void)
 	arg = strstr(xen_start_info->cmd_line, "xen_512gb_limit=");
 	if (!arg)
 		val = true;
-	else if (strtobool(arg + strlen("xen_512gb_limit="), &val))
+	else if (kstrtobool(arg + strlen("xen_512gb_limit="), &val))
 		return;
 
 	xen_512gb_limit = val;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 29/30] driver core: Use kstrtobool() instead of strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (27 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 28/30] x86/xen: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:14 ` [PATCH 30/30] kstrtox: Remove strtobool() Christophe JAILLET
                   ` (2 subsequent siblings)
  31 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

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>
---
This patch is part of a serie that axes all usages of strtobool().
Each patch can be applied independently from the other ones.

The last patch of the serie removes the definition of strtobool().

You may not be in copy of the cover letter. So, if needed, it is available
at [1].

[1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
---
 drivers/base/core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index d02501933467..5f6b80329cf1 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -14,6 +14,7 @@
 #include <linux/err.h>
 #include <linux/fwnode.h>
 #include <linux/init.h>
+#include <linux/kstrtox.h>
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/string.h>
@@ -1628,7 +1629,7 @@ early_param("fw_devlink", fw_devlink_setup);
 static bool fw_devlink_strict;
 static int __init fw_devlink_strict_setup(char *arg)
 {
-	return strtobool(arg, &fw_devlink_strict);
+	return kstrtobool(arg, &fw_devlink_strict);
 }
 early_param("fw_devlink.strict", fw_devlink_strict_setup);
 
@@ -2280,7 +2281,7 @@ ssize_t device_store_bool(struct device *dev, struct device_attribute *attr,
 {
 	struct dev_ext_attribute *ea = to_ext_attr(attr);
 
-	if (strtobool(buf, ea->var) < 0)
+	if (kstrtobool(buf, ea->var) < 0)
 		return -EINVAL;
 
 	return size;
@@ -2534,7 +2535,7 @@ static ssize_t online_store(struct device *dev, struct device_attribute *attr,
 	bool val;
 	int ret;
 
-	ret = strtobool(buf, &val);
+	ret = kstrtobool(buf, &val);
 	if (ret < 0)
 		return ret;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* [PATCH 30/30] kstrtox: Remove strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (28 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 29/30] driver core: " Christophe JAILLET
@ 2022-11-01 21:14 ` Christophe JAILLET
  2022-11-01 21:18   ` Christophe JAILLET
  2022-11-02 11:18 ` [PATCH 00/30] " Andy Shevchenko
  2023-01-20 18:18 ` (subset) " Catalin Marinas
  31 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:14 UTC (permalink / raw)
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET

strtobool() is the same as kstrtobool().
All uses of strtobool() have been turned into kstrtobool().

So strtobool() can now be removed as well.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 include/linux/kernel.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index fe6efb24d151..244b92041cb0 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -20,7 +20,7 @@
 #include <linux/compiler.h>
 #include <linux/container_of.h>
 #include <linux/bitops.h>
-#include <linux/kstrtox.h>
+//#include <linux/kstrtox.h>
 #include <linux/log2.h>
 #include <linux/math.h>
 #include <linux/minmax.h>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 71+ messages in thread

* Re: [PATCH 30/30] kstrtox: Remove strtobool()
  2022-11-01 21:14 ` [PATCH 30/30] kstrtox: Remove strtobool() Christophe JAILLET
@ 2022-11-01 21:18   ` Christophe JAILLET
  0 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-01 21:18 UTC (permalink / raw)
  Cc: linux-kernel, kernel-janitors

Le 01/11/2022 à 22:14, Christophe JAILLET a écrit :
> strtobool() is the same as kstrtobool().
> All uses of strtobool() have been turned into kstrtobool().
> 
> So strtobool() can now be removed as well.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   include/linux/kernel.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index fe6efb24d151..244b92041cb0 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -20,7 +20,7 @@
>   #include <linux/compiler.h>
>   #include <linux/container_of.h>
>   #include <linux/bitops.h>
> -#include <linux/kstrtox.h>
> +//#include <linux/kstrtox.h>
>   #include <linux/log2.h>
>   #include <linux/math.h>
>   #include <linux/minmax.h>

Ouch, the last patch is not what was expected...

I'll send it separately when the other patches are merged.

CJ

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 11/30] greybus: svc: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 11/30] greybus: svc: " Christophe JAILLET
@ 2022-11-01 21:49   ` Alex Elder
  2022-11-02  7:31   ` Johan Hovold
  1 sibling, 0 replies; 71+ messages in thread
From: Alex Elder @ 2022-11-01 21:49 UTC (permalink / raw)
  To: Christophe JAILLET, Johan Hovold, Alex Elder, Greg Kroah-Hartman
  Cc: linux-kernel, kernel-janitors, greybus-dev

On 11/1/22 4:13 PM, 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Looks OK to me.

Reviewed-by: Alex Elder <elder@linaro.org>

> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>   drivers/greybus/svc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
> index 56d2b44d6fef..16cced80867a 100644
> --- a/drivers/greybus/svc.c
> +++ b/drivers/greybus/svc.c
> @@ -7,6 +7,7 @@
>    */
>   
>   #include <linux/debugfs.h>
> +#include <linux/kstrtox.h>
>   #include <linux/workqueue.h>
>   #include <linux/greybus.h>
>   
> @@ -83,7 +84,7 @@ static ssize_t watchdog_store(struct device *dev,
>   	int retval;
>   	bool user_request;
>   
> -	retval = strtobool(buf, &user_request);
> +	retval = kstrtobool(buf, &user_request);
>   	if (retval)
>   		return retval;
>   


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 20/30] mm/damon: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 20/30] mm/damon: " Christophe JAILLET
@ 2022-11-01 22:00   ` SeongJae Park
  0 siblings, 0 replies; 71+ messages in thread
From: SeongJae Park @ 2022-11-01 22:00 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: SeongJae Park, Andrew Morton, linux-kernel, kernel-janitors,
	damon, linux-mm

On Tue, 1 Nov 2022 22:14:08 +0100 Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

[...]

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 21/30] mm: " Christophe JAILLET
@ 2022-11-01 22:47   ` Kees Cook
  2022-11-02 11:29     ` Andy Shevchenko
  2022-11-05  2:58   ` Pasha Tatashin
  1 sibling, 1 reply; 71+ messages in thread
From: Kees Cook @ 2022-11-01 22:47 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Pasha Tatashin, Andrew Morton, linux-kernel, kernel-janitors,
	linux-mm, linux-hardening

On Tue, Nov 01, 2022 at 10:14:09PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/

This seems in keeping with the removal of the simple_*str*() helpers:
https://docs.kernel.org/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull

Reviewed-by: Kees Cook <keescook@chromium.org>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 28/30] x86/xen: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 28/30] x86/xen: " Christophe JAILLET
@ 2022-11-01 23:11   ` Boris Ostrovsky
  0 siblings, 0 replies; 71+ messages in thread
From: Boris Ostrovsky @ 2022-11-01 23:11 UTC (permalink / raw)
  To: Christophe JAILLET, Juergen Gross, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin
  Cc: linux-kernel, kernel-janitors, xen-devel


On 11/1/22 5:14 PM, 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.
>
> While at it, include the corresponding header file (<linux/kstrtox.h>)
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
>
> The last patch of the serie removes the definition of strtobool().
>
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
>
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/


Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool() Christophe JAILLET
@ 2022-11-02  3:27   ` Jakub Kicinski
  0 siblings, 0 replies; 71+ messages in thread
From: Jakub Kicinski @ 2022-11-02  3:27 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Oliver Neukum, David S. Miller, Eric Dumazet, Paolo Abeni,
	Bjørn Mork, linux-kernel, kernel-janitors, linux-usb,
	netdev

On Tue,  1 Nov 2022 22:13:49 +0100 Christophe JAILLET wrote:
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/

Please repost this patch separately. Patch bots and CIs will not test
partially received series.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 13/30] platform/chrome: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 13/30] platform/chrome: " Christophe JAILLET
@ 2022-11-02  4:30   ` patchwork-bot+chrome-platform
  2022-11-02 12:30   ` patchwork-bot+chrome-platform
  1 sibling, 0 replies; 71+ messages in thread
From: patchwork-bot+chrome-platform @ 2022-11-02  4:30 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: bleung, groeck, linux-kernel, kernel-janitors, chrome-platform

Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue,  1 Nov 2022 22:14:01 +0100 you 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> [...]

Here is the summary with links:
  - [13/30] platform/chrome: Use kstrtobool() instead of strtobool()
    https://git.kernel.org/chrome-platform/c/58f23a6795a6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 06/30] nvme: " Christophe JAILLET
@ 2022-11-02  5:52   ` Chaitanya Kulkarni
  2022-11-02  6:47   ` Christoph Hellwig
  1 sibling, 0 replies; 71+ messages in thread
From: Chaitanya Kulkarni @ 2022-11-02  5:52 UTC (permalink / raw)
  To: Christophe JAILLET, Keith Busch, Jens Axboe, Christoph Hellwig,
	Sagi Grimberg, Chaitanya Kulkarni
  Cc: linux-kernel, kernel-janitors, linux-nvme

On 11/1/22 14:13, 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---

I believe you have tested this patch thoroughly, with that,

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 04/30] scsi: target: " Christophe JAILLET
@ 2022-11-02  5:54   ` Chaitanya Kulkarni
  2022-11-08  3:54   ` Martin K. Petersen
  2022-11-17 18:29   ` Martin K. Petersen
  2 siblings, 0 replies; 71+ messages in thread
From: Chaitanya Kulkarni @ 2022-11-02  5:54 UTC (permalink / raw)
  To: Christophe JAILLET, Martin K. Petersen
  Cc: linux-kernel, kernel-janitors, linux-scsi, target-devel

On 11/1/22 14:13, 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>   drivers/target/target_core_configfs.c        | 29 ++++++++++----------
>   drivers/target/target_core_fabric_configfs.c |  3 +-
>   2 files changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
> index 533524299ed6..b8a5c8d6cfde 100644
> --- a/drivers/target/target_core_configfs.c
> +++ b/drivers/target/target_core_configfs.c
> @@ -12,6 +12,7 @@
>    *
>    ****************************************************************************/
>   



I believe you have tested this patch thoroughly, with that,

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 06/30] nvme: " Christophe JAILLET
  2022-11-02  5:52   ` Chaitanya Kulkarni
@ 2022-11-02  6:47   ` Christoph Hellwig
  2022-11-02  6:57     ` Christophe JAILLET
  1 sibling, 1 reply; 71+ messages in thread
From: Christoph Hellwig @ 2022-11-02  6:47 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Keith Busch, Jens Axboe, Christoph Hellwig, Sagi Grimberg,
	Chaitanya Kulkarni, linux-kernel, kernel-janitors, linux-nvme

What are th other 29 patches doing in this series?  Due to the lack of
context individual patches from series have to through /dev/null here,
sorry.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
  2022-11-02  6:47   ` Christoph Hellwig
@ 2022-11-02  6:57     ` Christophe JAILLET
  2022-11-02  6:58       ` Christoph Hellwig
  2022-11-02  7:05       ` Julia Lawall
  0 siblings, 2 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-02  6:57 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Keith Busch, Jens Axboe, Sagi Grimberg, Chaitanya Kulkarni,
	linux-kernel, kernel-janitors, linux-nvme

Le 02/11/2022 à 07:47, Christoph Hellwig a écrit :
> What are th other 29 patches doing in this series?  Due to the lack of
> context individual patches from series have to through /dev/null here,
> sorry.
> 

Hi,

in each patch, in order to give some context, I wrote:
    ---
    This patch is part of a serie that axes all usages of strtobool().
    Each patch can be applied independently from the other ones.

    The last patch of the serie removes the definition of strtobool().

    You may not be in copy of the cover letter. So, if needed, it is
    available at [1].

    [1]: 
https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/


What is the best strategy for sending such patches?

Should I send only individual patches?
Should everybody be in copy of all patches? Or at least of the cover letter?


Some patches have already been Acked or even applied. So I'll wait a bit 
so that things stabilize before resending what is remaining.

CJ

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
  2022-11-02  6:57     ` Christophe JAILLET
@ 2022-11-02  6:58       ` Christoph Hellwig
  2022-11-02  7:05       ` Julia Lawall
  1 sibling, 0 replies; 71+ messages in thread
From: Christoph Hellwig @ 2022-11-02  6:58 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Christoph Hellwig, Keith Busch, Jens Axboe, Sagi Grimberg,
	Chaitanya Kulkarni, linux-kernel, kernel-janitors, linux-nvme

On Wed, Nov 02, 2022 at 07:57:23AM +0100, Christophe JAILLET wrote:
> What is the best strategy for sending such patches?

Just send them per subsystems as mini series or individual patches.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
  2022-11-02  6:57     ` Christophe JAILLET
  2022-11-02  6:58       ` Christoph Hellwig
@ 2022-11-02  7:05       ` Julia Lawall
  1 sibling, 0 replies; 71+ messages in thread
From: Julia Lawall @ 2022-11-02  7:05 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Christoph Hellwig, Keith Busch, Jens Axboe, Sagi Grimberg,
	Chaitanya Kulkarni, linux-kernel, kernel-janitors, linux-nvme

[-- Attachment #1: Type: text/plain, Size: 1374 bytes --]



On Wed, 2 Nov 2022, Christophe JAILLET wrote:

> Le 02/11/2022 à 07:47, Christoph Hellwig a écrit :
> > What are th other 29 patches doing in this series?  Due to the lack of
> > context individual patches from series have to through /dev/null here,
> > sorry.
> >
>
> Hi,
>
> in each patch, in order to give some context, I wrote:
>    ---
>    This patch is part of a serie that axes all usages of strtobool().
>    Each patch can be applied independently from the other ones.
>
>    The last patch of the serie removes the definition of strtobool().
>
>    You may not be in copy of the cover letter. So, if needed, it is
>    available at [1].
>
>    [1]:
> https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
>
>
> What is the best strategy for sending such patches?

I send the cover letter to everyone.  The problem with sending individual
unconnected patches is that people who are looking at the patches on
generic mailing lists can't easily see that they should just skip over all
of them at once.  But it is hard to please everyone for this issue...

julia

>
> Should I send only individual patches?
> Should everybody be in copy of all patches? Or at least of the cover letter?
>
>
> Some patches have already been Acked or even applied. So I'll wait a bit so
> that things stabilize before resending what is remaining.
>
> CJ
>

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 11/30] greybus: svc: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 11/30] greybus: svc: " Christophe JAILLET
  2022-11-01 21:49   ` Alex Elder
@ 2022-11-02  7:31   ` Johan Hovold
  1 sibling, 0 replies; 71+ messages in thread
From: Johan Hovold @ 2022-11-02  7:31 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Alex Elder, Greg Kroah-Hartman, linux-kernel, kernel-janitors,
	greybus-dev

On Tue, Nov 01, 2022 at 10:13:59PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Sure, why not:

Reviewed-by: Johan Hovold <johan@kernel.org>

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 10/30] clocksource/drivers/arm_arch_timer: " Christophe JAILLET
@ 2022-11-02 10:56   ` Mark Rutland
  2022-12-02 12:17   ` Daniel Lezcano
  1 sibling, 0 replies; 71+ messages in thread
From: Mark Rutland @ 2022-11-02 10:56 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Marc Zyngier, Daniel Lezcano, Thomas Gleixner, linux-kernel,
	kernel-janitors, linux-arm-kernel

On Tue, Nov 01, 2022 at 10:13:58PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  drivers/clocksource/arm_arch_timer.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> 
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index a7ff77550e17..1af045b231fd 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -18,6 +18,7 @@
>  #include <linux/clocksource.h>
>  #include <linux/clocksource_ids.h>
>  #include <linux/interrupt.h>
> +#include <linux/kstrtox.h>
>  #include <linux/of_irq.h>
>  #include <linux/of_address.h>
>  #include <linux/io.h>
> @@ -97,7 +98,7 @@ static bool evtstrm_enable __ro_after_init = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EV
>  
>  static int __init early_evtstrm_cfg(char *buf)
>  {
> -	return strtobool(buf, &evtstrm_enable);
> +	return kstrtobool(buf, &evtstrm_enable);
>  }
>  early_param("clocksource.arm_arch_timer.evtstrm", early_evtstrm_cfg);
>  
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 00/30] Remove strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (29 preceding siblings ...)
  2022-11-01 21:14 ` [PATCH 30/30] kstrtox: Remove strtobool() Christophe JAILLET
@ 2022-11-02 11:18 ` Andy Shevchenko
  2023-01-20 18:18 ` (subset) " Catalin Marinas
  31 siblings, 0 replies; 71+ messages in thread
From: Andy Shevchenko @ 2022-11-02 11:18 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: akpm, senozhatsky, wangkefeng.wang, axboe, kbusch, sfr,
	mark.rutland, linux-kernel, kernel-janitors

On Tue, Nov 01, 2022 at 10:05:37PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> 
> Each patch can be applied independently from the other ones.
> The last patch of the serie removes the definition of strtobool().
> 
> All patches have been compile tested, except the ones against
> arm64, s390 and irq-gic.

I got only a cover letter...
Luckily we have a powerful `b4` tool and available archives on lore.kernel.org :-)

> Finally, this gives the opportunity to remove some <linux/kernel.h> from
> a few drivers. This will be addressed later when/if the serie is applied.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
  2022-11-01 22:47   ` Kees Cook
@ 2022-11-02 11:29     ` Andy Shevchenko
  0 siblings, 0 replies; 71+ messages in thread
From: Andy Shevchenko @ 2022-11-02 11:29 UTC (permalink / raw)
  To: Kees Cook
  Cc: Christophe JAILLET, Pasha Tatashin, Andrew Morton, linux-kernel,
	kernel-janitors, linux-mm, linux-hardening

On Tue, Nov 01, 2022 at 03:47:20PM -0700, Kees Cook wrote:
> On Tue, Nov 01, 2022 at 10:14:09PM +0100, Christophe JAILLET wrote:

...

> This seems in keeping with the removal of the simple_*str*() helpers:
> https://docs.kernel.org/process/deprecated.html#simple-strtol-simple-strtoll-simple-strtoul-simple-strtoull

That piece of the documentation is partially wrong. Nobody will going to remove
simple_strtox() due to their convenience when it's related to parse something
from the stream. Yes, overflow is possible, but here is a trade-off.

Note, kstrtox() may not work at early boot stages when we need to parse stream
(with mixed digits and text and symbols) without acquiring space from the heap,
i.o.w. RO strings.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 09/30] ACPI: sysfs: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 09/30] ACPI: sysfs: " Christophe JAILLET
@ 2022-11-02 11:33   ` Andy Shevchenko
  2022-11-03 18:48     ` Rafael J. Wysocki
  0 siblings, 1 reply; 71+ messages in thread
From: Andy Shevchenko @ 2022-11-02 11:33 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Rafael J. Wysocki, Len Brown, linux-kernel, kernel-janitors, linux-acpi

On Tue, Nov 01, 2022 at 10:13:57PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  drivers/acpi/sysfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> index cc2fe0618178..2d81c742e4d2 100644
> --- a/drivers/acpi/sysfs.c
> +++ b/drivers/acpi/sysfs.c
> @@ -9,6 +9,7 @@
>  #include <linux/bitmap.h>
>  #include <linux/init.h>
>  #include <linux/kernel.h>
> +#include <linux/kstrtox.h>
>  #include <linux/moduleparam.h>
>  
>  #include "internal.h"
> @@ -992,7 +993,7 @@ static ssize_t force_remove_store(struct kobject *kobj,
>  	bool val;
>  	int ret;
>  
> -	ret = strtobool(buf, &val);
> +	ret = kstrtobool(buf, &val);
>  	if (ret < 0)
>  		return ret;
>  
> -- 
> 2.34.1
> 
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 13/30] platform/chrome: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 13/30] platform/chrome: " Christophe JAILLET
  2022-11-02  4:30   ` patchwork-bot+chrome-platform
@ 2022-11-02 12:30   ` patchwork-bot+chrome-platform
  1 sibling, 0 replies; 71+ messages in thread
From: patchwork-bot+chrome-platform @ 2022-11-02 12:30 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: bleung, groeck, linux-kernel, kernel-janitors, chrome-platform

Hello:

This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue,  1 Nov 2022 22:14:01 +0100 you 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> [...]

Here is the summary with links:
  - [13/30] platform/chrome: Use kstrtobool() instead of strtobool()
    https://git.kernel.org/chrome-platform/c/58f23a6795a6

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 24/30] arm64: cpufeature: " Christophe JAILLET
@ 2022-11-02 13:46   ` Catalin Marinas
  2023-01-14 13:29     ` Christophe JAILLET
  0 siblings, 1 reply; 71+ messages in thread
From: Catalin Marinas @ 2022-11-02 13:46 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Will Deacon, linux-kernel, kernel-janitors, linux-arm-kernel

On Tue, Nov 01, 2022 at 10:14:12PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 18/30] module: " Christophe JAILLET
@ 2022-11-02 18:41   ` Luis Chamberlain
  2023-01-14 13:32     ` Christophe JAILLET
  2022-11-06 15:03   ` Aaron Tomlin
  2023-01-17 15:39   ` Luis Chamberlain
  2 siblings, 1 reply; 71+ messages in thread
From: Luis Chamberlain @ 2022-11-02 18:41 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: linux-kernel, kernel-janitors, linux-modules

On Tue, Nov 01, 2022 at 10:14:06PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 14/30] powercap: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 14/30] powercap: " Christophe JAILLET
@ 2022-11-03 18:39   ` Rafael J. Wysocki
  0 siblings, 0 replies; 71+ messages in thread
From: Rafael J. Wysocki @ 2022-11-03 18:39 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Rafael J. Wysocki, linux-kernel, kernel-janitors, linux-pm

On Tue, Nov 1, 2022 at 10:15 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> 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.
>
> While at it, include the corresponding header file (<linux/kstrtox.h>)
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
>
> The last patch of the serie removes the definition of strtobool().
>
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
>
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  drivers/powercap/powercap_sys.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/powercap/powercap_sys.c b/drivers/powercap/powercap_sys.c
> index f0654a932b37..1f968353d479 100644
> --- a/drivers/powercap/powercap_sys.c
> +++ b/drivers/powercap/powercap_sys.c
> @@ -7,6 +7,7 @@
>  #include <linux/module.h>
>  #include <linux/device.h>
>  #include <linux/err.h>
> +#include <linux/kstrtox.h>
>  #include <linux/slab.h>
>  #include <linux/powercap.h>
>
> @@ -446,7 +447,7 @@ static ssize_t enabled_store(struct device *dev,
>  {
>         bool mode;
>
> -       if (strtobool(buf, &mode))
> +       if (kstrtobool(buf, &mode))
>                 return -EINVAL;
>         if (dev->parent) {
>                 struct powercap_zone *power_zone = to_powercap_zone(dev);
> --

Applied as 6.2 material, thanks!

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 09/30] ACPI: sysfs: Use kstrtobool() instead of strtobool()
  2022-11-02 11:33   ` Andy Shevchenko
@ 2022-11-03 18:48     ` Rafael J. Wysocki
  0 siblings, 0 replies; 71+ messages in thread
From: Rafael J. Wysocki @ 2022-11-03 18:48 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christophe JAILLET, Rafael J. Wysocki, Len Brown, linux-kernel,
	kernel-janitors, linux-acpi

On Wed, Nov 2, 2022 at 12:33 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> On Tue, Nov 01, 2022 at 10:13:57PM +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.
> >
> > While at it, include the corresponding header file (<linux/kstrtox.h>)
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > ---
> > This patch is part of a serie that axes all usages of strtobool().
> > Each patch can be applied independently from the other ones.
> >
> > The last patch of the serie removes the definition of strtobool().
> >
> > You may not be in copy of the cover letter. So, if needed, it is available
> > at [1].
> >
> > [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> > ---
> >  drivers/acpi/sysfs.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c
> > index cc2fe0618178..2d81c742e4d2 100644
> > --- a/drivers/acpi/sysfs.c
> > +++ b/drivers/acpi/sysfs.c
> > @@ -9,6 +9,7 @@
> >  #include <linux/bitmap.h>
> >  #include <linux/init.h>
> >  #include <linux/kernel.h>
> > +#include <linux/kstrtox.h>
> >  #include <linux/moduleparam.h>
> >
> >  #include "internal.h"
> > @@ -992,7 +993,7 @@ static ssize_t force_remove_store(struct kobject *kobj,
> >       bool val;
> >       int ret;
> >
> > -     ret = strtobool(buf, &val);
> > +     ret = kstrtobool(buf, &val);
> >       if (ret < 0)
> >               return ret;
> >
> > --

Applied as 6.2 material, thanks!

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 12/30] input: " Christophe JAILLET
@ 2022-11-03 20:46   ` Dmitry Torokhov
  2022-11-03 21:37     ` Christophe JAILLET
  0 siblings, 1 reply; 71+ messages in thread
From: Dmitry Torokhov @ 2022-11-03 20:46 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: linux-kernel, kernel-janitors, linux-input

On Tue, Nov 01, 2022 at 10:14:00PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Please feel free to merge with the rest of the series. Or let me know if
you want me to pick just this one through my tree.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
  2022-11-03 20:46   ` Dmitry Torokhov
@ 2022-11-03 21:37     ` Christophe JAILLET
  2022-11-07 19:40       ` Dmitry Torokhov
  0 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-03 21:37 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, kernel-janitors, linux-input

Le 03/11/2022 à 21:46, Dmitry Torokhov a écrit :
> On Tue, Nov 01, 2022 at 10:14:00PM +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.
>>
>> While at it, include the corresponding header file (<linux/kstrtox.h>)
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> Please feel free to merge with the rest of the series. Or let me know if
> you want me to pick just this one through my tree.
> 
> Thanks.
> 

Hi,

the patch can go through your tree.
There is no plan to merge the whole serie at once, and some other 
maintainers have asked for some patches to be re-sent as individual patches.

CJ

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 21/30] mm: " Christophe JAILLET
  2022-11-01 22:47   ` Kees Cook
@ 2022-11-05  2:58   ` Pasha Tatashin
  1 sibling, 0 replies; 71+ messages in thread
From: Pasha Tatashin @ 2022-11-05  2:58 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Andrew Morton, Kees Cook, linux-kernel, kernel-janitors,
	linux-mm, linux-hardening

On Tue, Nov 1, 2022 at 5:15 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> 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.
>
> While at it, include the corresponding header file (<linux/kstrtox.h>)
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
>
> The last patch of the serie removes the definition of strtobool().
>
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
>
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  mm/page_table_check.c | 3 ++-
>  mm/usercopy.c         | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/mm/page_table_check.c b/mm/page_table_check.c
> index 433dbce13fe1..93e633c1d587 100644
> --- a/mm/page_table_check.c
> +++ b/mm/page_table_check.c
> @@ -4,6 +4,7 @@
>   * Copyright (c) 2021, Google LLC.
>   * Pasha Tatashin <pasha.tatashin@soleen.com>
>   */
> +#include <linux/kstrtox.h>
>  #include <linux/mm.h>
>  #include <linux/page_table_check.h>
>
> @@ -23,7 +24,7 @@ EXPORT_SYMBOL(page_table_check_disabled);
>
>  static int __init early_page_table_check_param(char *buf)
>  {
> -       return strtobool(buf, &__page_table_check_enabled);
> +       return kstrtobool(buf, &__page_table_check_enabled);
>  }

Acked-by: Pasha Tatashin <pasha.tatashin@soleen.com>

>
>  early_param("page_table_check", early_page_table_check_param);
> diff --git a/mm/usercopy.c b/mm/usercopy.c
> index c1ee15a98633..4c3164beacec 100644
> --- a/mm/usercopy.c
> +++ b/mm/usercopy.c
> @@ -12,6 +12,7 @@
>
>  #include <linux/mm.h>
>  #include <linux/highmem.h>
> +#include <linux/kstrtox.h>
>  #include <linux/slab.h>
>  #include <linux/sched.h>
>  #include <linux/sched/task.h>
> @@ -258,7 +259,7 @@ static bool enable_checks __initdata = true;
>
>  static int __init parse_hardened_usercopy(char *str)
>  {
> -       if (strtobool(str, &enable_checks))
> +       if (kstrtobool(str, &enable_checks))
>                 pr_warn("Invalid option string for hardened_usercopy: '%s'\n",
>                         str);
>         return 1;
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 18/30] module: " Christophe JAILLET
  2022-11-02 18:41   ` Luis Chamberlain
@ 2022-11-06 15:03   ` Aaron Tomlin
  2023-01-17 15:39   ` Luis Chamberlain
  2 siblings, 0 replies; 71+ messages in thread
From: Aaron Tomlin @ 2022-11-06 15:03 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Luis Chamberlain, linux-kernel, kernel-janitors, linux-modules

On Tue 2022-11-01 22:14 +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>  kernel/module/main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index ff2dfd1f548d..79e17522e196 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -17,6 +17,7 @@
>  #include <linux/fs.h>
>  #include <linux/kernel.h>
>  #include <linux/kernel_read_file.h>
> +#include <linux/kstrtox.h>
>  #include <linux/slab.h>
>  #include <linux/vmalloc.h>
>  #include <linux/elf.h>
> @@ -2649,7 +2650,7 @@ static int unknown_module_param_cb(char *param, char *val, const char *modname,
>  	int ret;
>  
>  	if (strcmp(param, "async_probe") == 0) {
> -		if (strtobool(val, &mod->async_probe_requested))
> +		if (kstrtobool(val, &mod->async_probe_requested))
>  			mod->async_probe_requested = true;
>  		return 0;
>  	}
> -- 
> 2.34.1
> 

Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>

-- 
Aaron Tomlin


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
  2022-11-03 21:37     ` Christophe JAILLET
@ 2022-11-07 19:40       ` Dmitry Torokhov
  0 siblings, 0 replies; 71+ messages in thread
From: Dmitry Torokhov @ 2022-11-07 19:40 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: linux-kernel, kernel-janitors, linux-input

On Thu, Nov 03, 2022 at 10:37:19PM +0100, Christophe JAILLET wrote:
> Le 03/11/2022 à 21:46, Dmitry Torokhov a écrit :
> > On Tue, Nov 01, 2022 at 10:14:00PM +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.
> > > 
> > > While at it, include the corresponding header file (<linux/kstrtox.h>)
> > > 
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > 
> > Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > 
> > Please feel free to merge with the rest of the series. Or let me know if
> > you want me to pick just this one through my tree.
> > 
> > Thanks.
> > 
> 
> Hi,
> 
> the patch can go through your tree.
> There is no plan to merge the whole serie at once, and some other
> maintainers have asked for some patches to be re-sent as individual patches.

OK, applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 04/30] scsi: target: " Christophe JAILLET
  2022-11-02  5:54   ` Chaitanya Kulkarni
@ 2022-11-08  3:54   ` Martin K. Petersen
  2022-11-17 18:29   ` Martin K. Petersen
  2 siblings, 0 replies; 71+ messages in thread
From: Martin K. Petersen @ 2022-11-08  3:54 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Martin K. Petersen, linux-kernel, kernel-janitors, linux-scsi,
	target-devel


Christophe,

> strtobool() is the same as kstrtobool().  However, the latter is more
> used within the kernel.

Applied to 6.2/scsi-staging, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 02/30] wifi: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 02/30] wifi: " Christophe JAILLET
@ 2022-11-08  7:39   ` Kalle Valo
  0 siblings, 0 replies; 71+ messages in thread
From: Kalle Valo @ 2022-11-08  7:39 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Toke Høiland-Jørgensen, Amitkumar Karwar,
	Ganapathi Bhat, Sharvari Harisangam, Xinming Hu, linux-kernel,
	kernel-janitors, Christophe JAILLET, ath10k, linux-wireless,
	netdev

Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Patch applied to wireless-next.git, thanks.

417f173532cc wifi: Use kstrtobool() instead of strtobool()

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1ff34549af5ad6f7c80d5b9e11872b5499065fc1.1667336095.git.christophe.jaillet@wanadoo.fr/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 26/30] s390/ipl: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 26/30] s390/ipl: " Christophe JAILLET
@ 2022-11-08 14:53   ` Alexander Gordeev
  0 siblings, 0 replies; 71+ messages in thread
From: Alexander Gordeev @ 2022-11-08 14:53 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	Sven Schnelle, linux-kernel, kernel-janitors, linux-s390

On Tue, Nov 01, 2022 at 10:14:14PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Applied, thanks!

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 04/30] scsi: target: " Christophe JAILLET
  2022-11-02  5:54   ` Chaitanya Kulkarni
  2022-11-08  3:54   ` Martin K. Petersen
@ 2022-11-17 18:29   ` Martin K. Petersen
  2 siblings, 0 replies; 71+ messages in thread
From: Martin K. Petersen @ 2022-11-17 18:29 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Martin K . Petersen, target-devel, linux-scsi, kernel-janitors,
	linux-kernel

On Tue, 1 Nov 2022 22:13:52 +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> [...]

Applied to 6.2/scsi-queue, thanks!

[04/30] scsi: target: Use kstrtobool() instead of strtobool()
        https://git.kernel.org/mkp/scsi/c/e56ca6bcd213

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 03/30] irqchip: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 03/30] irqchip: " Christophe JAILLET
@ 2022-11-26 12:46   ` Marc Zyngier
  2022-11-26 15:16     ` Christophe JAILLET
  0 siblings, 1 reply; 71+ messages in thread
From: Marc Zyngier @ 2022-11-26 12:46 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: Thomas Gleixner, linux-kernel, kernel-janitors

On Tue, 01 Nov 2022 21:13:51 +0000,
Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> 
> This patch has NOT been compile tested.

Thanks for having the honesty to state that this hasn't been even
compile tested. However, and for fairly obvious reason, I will not
take such patches.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 03/30] irqchip: Use kstrtobool() instead of strtobool()
  2022-11-26 12:46   ` Marc Zyngier
@ 2022-11-26 15:16     ` Christophe JAILLET
  0 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2022-11-26 15:16 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: Thomas Gleixner, linux-kernel, kernel-janitors

Le 26/11/2022 à 13:46, Marc Zyngier a écrit :
> On Tue, 01 Nov 2022 21:13:51 +0000,
> Christophe JAILLET <christophe.jaillet@wanadoo.fr> 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.
>>
>> While at it, include the corresponding header file (<linux/kstrtox.h>)
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> This patch is part of a serie that axes all usages of strtobool().
>> Each patch can be applied independently from the other ones.
>>
>> The last patch of the serie removes the definition of strtobool().
>>
>> You may not be in copy of the cover letter. So, if needed, it is available
>> at [1].
>>
>>
>> This patch has NOT been compile tested.
> 
> Thanks for having the honesty to state that this hasn't been even
> compile tested. However, and for fairly obvious reason, I will not
> take such patches.

Ok, so, with a sucessful:
   sudo apt install libc6-armel-cross libc6-dev-armel-cross 
binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex 
libssl-dev bc
   sudo apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi

   make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 allmodconfig

   patch -p1 < strtobool.diff

   make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 
./drivers/irqchip/irq-gic.o
   make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabi- -j7 
./drivers/irqchip/irq-gic-v3.o

can I make you change your mind?

CJ

> 
> Thanks,
> 
> 	M.
> 


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
  2022-11-01 21:13 ` [PATCH 10/30] clocksource/drivers/arm_arch_timer: " Christophe JAILLET
  2022-11-02 10:56   ` Mark Rutland
@ 2022-12-02 12:17   ` Daniel Lezcano
  1 sibling, 0 replies; 71+ messages in thread
From: Daniel Lezcano @ 2022-12-02 12:17 UTC (permalink / raw)
  To: Christophe JAILLET, Mark Rutland, Marc Zyngier, Thomas Gleixner
  Cc: linux-kernel, kernel-janitors, linux-arm-kernel

On 01/11/2022 22:13, 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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---
>   drivers/clocksource/arm_arch_timer.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index a7ff77550e17..1af045b231fd 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -18,6 +18,7 @@
>   #include <linux/clocksource.h>
>   #include <linux/clocksource_ids.h>
>   #include <linux/interrupt.h>
> +#include <linux/kstrtox.h>
>   #include <linux/of_irq.h>
>   #include <linux/of_address.h>
>   #include <linux/io.h>
> @@ -97,7 +98,7 @@ static bool evtstrm_enable __ro_after_init = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EV
>   
>   static int __init early_evtstrm_cfg(char *buf)
>   {
> -	return strtobool(buf, &evtstrm_enable);
> +	return kstrtobool(buf, &evtstrm_enable);
>   }
>   early_param("clocksource.arm_arch_timer.evtstrm", early_evtstrm_cfg);
>   

Applied, thanks

-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
  2022-11-02 13:46   ` Catalin Marinas
@ 2023-01-14 13:29     ` Christophe JAILLET
  2023-01-16 18:40       ` Catalin Marinas
  0 siblings, 1 reply; 71+ messages in thread
From: Christophe JAILLET @ 2023-01-14 13:29 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Will Deacon, linux-kernel, kernel-janitors, linux-arm-kernel

Le 02/11/2022 à 14:46, Catalin Marinas a écrit :
> On Tue, Nov 01, 2022 at 10:14:12PM +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.
>>
>> While at it, include the corresponding header file (<linux/kstrtox.h>)
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 

Hi,

This has been A-b 2 months ago, and I've just resent patches in this 
serie that have neither been merged in -next, nor A-b or R-b.

So for this one, it is just a polite reminder. :)

Do you have visibility on when it should be merged?

CJ

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
  2022-11-02 18:41   ` Luis Chamberlain
@ 2023-01-14 13:32     ` Christophe JAILLET
  0 siblings, 0 replies; 71+ messages in thread
From: Christophe JAILLET @ 2023-01-14 13:32 UTC (permalink / raw)
  To: Luis Chamberlain, atomlin; +Cc: linux-kernel, kernel-janitors, linux-modules

Le 02/11/2022 à 19:41, Luis Chamberlain a écrit :
> On Tue, Nov 01, 2022 at 10:14:06PM +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.
>>
>> While at it, include the corresponding header file (<linux/kstrtox.h>)
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> 
> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
> 
>    Luis
> 

Hi,

This has been R-b 2 months ago by 2 persons, and I've just resent 
patches in this serie that have neither been merged in -next, nor A-b or 
R-b.

So for this one, it is just a polite reminder. 😄

Do you have visibility on when it should be merged?

CJ

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
  2023-01-14 13:29     ` Christophe JAILLET
@ 2023-01-16 18:40       ` Catalin Marinas
  0 siblings, 0 replies; 71+ messages in thread
From: Catalin Marinas @ 2023-01-16 18:40 UTC (permalink / raw)
  To: Christophe JAILLET
  Cc: Will Deacon, linux-kernel, kernel-janitors, linux-arm-kernel

On Sat, Jan 14, 2023 at 02:29:46PM +0100, Christophe JAILLET wrote:
> Le 02/11/2022 à 14:46, Catalin Marinas a écrit :
> > On Tue, Nov 01, 2022 at 10:14:12PM +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.
> > > 
> > > While at it, include the corresponding header file (<linux/kstrtox.h>)
> > > 
> > > Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> > 
> > Acked-by: Catalin Marinas <catalin.marinas@arm.com>
> 
> This has been A-b 2 months ago, and I've just resent patches in this serie
> that have neither been merged in -next, nor A-b or R-b.
> 
> So for this one, it is just a polite reminder. :)
> 
> Do you have visibility on when it should be merged?

When large tree-wide series turn up on the list, there's always a
confusion on how they'd get merged. I guess you are expecting such
patches to go in via individual maintainer trees. It wasn't obvious from
to me (I can now see there was some text in the patch description).

I'll add it to my list for 6.3.

-- 
Catalin

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
  2022-11-01 21:14 ` [PATCH 18/30] module: " Christophe JAILLET
  2022-11-02 18:41   ` Luis Chamberlain
  2022-11-06 15:03   ` Aaron Tomlin
@ 2023-01-17 15:39   ` Luis Chamberlain
  2 siblings, 0 replies; 71+ messages in thread
From: Luis Chamberlain @ 2023-01-17 15:39 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: linux-kernel, kernel-janitors, linux-modules

On Tue, Nov 01, 2022 at 10:14:06PM +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> This patch is part of a serie that axes all usages of strtobool().
> Each patch can be applied independently from the other ones.
> 
> The last patch of the serie removes the definition of strtobool().
> 
> You may not be in copy of the cover letter. So, if needed, it is available
> at [1].
> 
> [1]: https://lore.kernel.org/all/cover.1667336095.git.christophe.jaillet@wanadoo.fr/
> ---

Queued up to modules-next.

  Luis

^ permalink raw reply	[flat|nested] 71+ messages in thread

* Re: (subset) [PATCH 00/30] Remove strtobool()
  2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
                   ` (30 preceding siblings ...)
  2022-11-02 11:18 ` [PATCH 00/30] " Andy Shevchenko
@ 2023-01-20 18:18 ` Catalin Marinas
  31 siblings, 0 replies; 71+ messages in thread
From: Catalin Marinas @ 2023-01-20 18:18 UTC (permalink / raw)
  To: akpm, andriy.shevchenko, senozhatsky, wangkefeng.wang, axboe,
	kbusch, sfr, mark.rutland, Christophe JAILLET
  Cc: Will Deacon, linux-kernel, kernel-janitors

On Tue, 01 Nov 2022 22:05:37 +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.
> 
> While at it, include the corresponding header file (<linux/kstrtox.h>)
> 
> [...]

Applied to arm64 (for-next/misc), thanks!

[24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
        https://git.kernel.org/arm64/c/1a920c92cd0c

-- 
Catalin


^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2023-01-20 18:18 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-01 21:05 [PATCH 00/30] Remove strtobool() Christophe JAILLET
2022-11-01 21:13 ` [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool() Christophe JAILLET
2022-11-02  3:27   ` Jakub Kicinski
2022-11-01 21:13 ` [PATCH 02/30] wifi: " Christophe JAILLET
2022-11-08  7:39   ` Kalle Valo
2022-11-01 21:13 ` [PATCH 03/30] irqchip: " Christophe JAILLET
2022-11-26 12:46   ` Marc Zyngier
2022-11-26 15:16     ` Christophe JAILLET
2022-11-01 21:13 ` [PATCH 04/30] scsi: target: " Christophe JAILLET
2022-11-02  5:54   ` Chaitanya Kulkarni
2022-11-08  3:54   ` Martin K. Petersen
2022-11-17 18:29   ` Martin K. Petersen
2022-11-01 21:13 ` [PATCH 05/30] nvdimm: " Christophe JAILLET
2022-11-01 21:13 ` [PATCH 06/30] nvme: " Christophe JAILLET
2022-11-02  5:52   ` Chaitanya Kulkarni
2022-11-02  6:47   ` Christoph Hellwig
2022-11-02  6:57     ` Christophe JAILLET
2022-11-02  6:58       ` Christoph Hellwig
2022-11-02  7:05       ` Julia Lawall
2022-11-01 21:13 ` [PATCH 07/30] usb: core: " Christophe JAILLET
2022-11-01 21:13 ` [PATCH 08/30] usb: gadget: " Christophe JAILLET
2022-11-01 21:13 ` [PATCH 09/30] ACPI: sysfs: " Christophe JAILLET
2022-11-02 11:33   ` Andy Shevchenko
2022-11-03 18:48     ` Rafael J. Wysocki
2022-11-01 21:13 ` [PATCH 10/30] clocksource/drivers/arm_arch_timer: " Christophe JAILLET
2022-11-02 10:56   ` Mark Rutland
2022-12-02 12:17   ` Daniel Lezcano
2022-11-01 21:13 ` [PATCH 11/30] greybus: svc: " Christophe JAILLET
2022-11-01 21:49   ` Alex Elder
2022-11-02  7:31   ` Johan Hovold
2022-11-01 21:14 ` [PATCH 12/30] input: " Christophe JAILLET
2022-11-03 20:46   ` Dmitry Torokhov
2022-11-03 21:37     ` Christophe JAILLET
2022-11-07 19:40       ` Dmitry Torokhov
2022-11-01 21:14 ` [PATCH 13/30] platform/chrome: " Christophe JAILLET
2022-11-02  4:30   ` patchwork-bot+chrome-platform
2022-11-02 12:30   ` patchwork-bot+chrome-platform
2022-11-01 21:14 ` [PATCH 14/30] powercap: " Christophe JAILLET
2022-11-03 18:39   ` Rafael J. Wysocki
2022-11-01 21:14 ` [PATCH 15/30] video: fbdev: omapfb: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 16/30] cifs: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 17/30] initramfs: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 18/30] module: " Christophe JAILLET
2022-11-02 18:41   ` Luis Chamberlain
2023-01-14 13:32     ` Christophe JAILLET
2022-11-06 15:03   ` Aaron Tomlin
2023-01-17 15:39   ` Luis Chamberlain
2022-11-01 21:14 ` [PATCH 19/30] kernel/params.c: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 20/30] mm/damon: " Christophe JAILLET
2022-11-01 22:00   ` SeongJae Park
2022-11-01 21:14 ` [PATCH 21/30] mm: " Christophe JAILLET
2022-11-01 22:47   ` Kees Cook
2022-11-02 11:29     ` Andy Shevchenko
2022-11-05  2:58   ` Pasha Tatashin
2022-11-01 21:14 ` [PATCH 22/30] Bluetooth: hci_debugfs: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 23/30] test_firmware: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 24/30] arm64: cpufeature: " Christophe JAILLET
2022-11-02 13:46   ` Catalin Marinas
2023-01-14 13:29     ` Christophe JAILLET
2023-01-16 18:40       ` Catalin Marinas
2022-11-01 21:14 ` [PATCH 25/30] KVM: arm64: vgic-v3: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 26/30] s390/ipl: " Christophe JAILLET
2022-11-08 14:53   ` Alexander Gordeev
2022-11-01 21:14 ` [PATCH 27/30] KVM: x86/mmu: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 28/30] x86/xen: " Christophe JAILLET
2022-11-01 23:11   ` Boris Ostrovsky
2022-11-01 21:14 ` [PATCH 29/30] driver core: " Christophe JAILLET
2022-11-01 21:14 ` [PATCH 30/30] kstrtox: Remove strtobool() Christophe JAILLET
2022-11-01 21:18   ` Christophe JAILLET
2022-11-02 11:18 ` [PATCH 00/30] " Andy Shevchenko
2023-01-20 18:18 ` (subset) " Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).