Remove strtobool()
Subsystems (48)
cover Remove strtobool()
strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel.
In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name.
While at it, include the corresponding header file (<linux/kstrtox.h>)
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(-)
Signature · 1 line
2.34.1
PATCH 1/30 net: usb: Use kstrtobool() instead of strtobool()
strtobool() is the same as kstrtobool(). However, the latter is more used within the kernel.
In order to remove strtobool() and slightly simplify kstrtox.h, switch to the other function name.
While at it, include the corresponding header file (<linux/kstrtox.h>)
---
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/[email protected]/
--- drivers/net/usb/cdc_ncm.c | 3 ++- drivers/net/usb/qmi_wwan.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/net/usb/cdc_ncm.c +2 -1
@@ -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 *attrstruct 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? */
drivers/net/usb/qmi_wwan.c +3 -2
@@ -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, cobool 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;
Signature · 1 line
2.34.1
PATCH 2/30 wifi: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- 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(-)
drivers/net/wireless/ath/ath10k/debug.c +3 -2
@@ -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);
drivers/net/wireless/ath/ath9k/ath9k.h +1 -0
@@ -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>
drivers/net/wireless/ath/ath9k/tx99.c +1 -1
@@ -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);
drivers/net/wireless/marvell/mwifiex/debugfs.c +1 -1
@@ -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, ×hare_coex)) +if (kstrtobool (kbuf, ×hare_coex))return -EINVAL ; ret = mwifiex_send_cmd(priv, HostCmd_CMD_ROBUST_COEX,
drivers/net/wireless/marvell/mwifiex/main.h +1 -0
@@ -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>
Signature · 1 line
2.34.1
PATCH 3/30 irqchip: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/irqchip/irq-gic-v3.c | 3 ++- drivers/irqchip/irq-gic.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/irqchip/irq-gic-v3.c +2 -1
@@ -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);
drivers/irqchip/irq-gic.c +2 -1
@@ -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);
Signature · 1 line
2.34.1
PATCH 4/30 scsi: target: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/target/target_core_configfs.c | 29 ++++++++++---------- drivers/target/target_core_fabric_configfs.c | 3 +- 2 files changed, 17 insertions(+), 15 deletions(-)
drivers/target/target_core_configfs.c +15 -14
@@ -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;
drivers/target/target_core_fabric_configfs.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 6/30 nvme: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/nvme/host/pci.c | 3 ++- drivers/nvme/target/configfs.c | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-)
drivers/nvme/host/pci.c +2 -1
@@ -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)
drivers/nvme/target/configfs.c +9 -8
@@ -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)
Signature · 1 line
2.34.1
PATCH 20/30 mm/damon: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- mm/damon/lru_sort.c | 3 ++- mm/damon/reclaim.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
mm/damon/lru_sort.c +2 -1
@@ -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;
mm/damon/reclaim.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 21/30 mm: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- mm/page_table_check.c | 3 ++- mm/usercopy.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
mm/page_table_check.c +2 -1
@@ -4,6 +4,7 @@* Copyright (c) 2021, Google LLC. * Pasha Tatashin <[email protected]> */ +#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);
mm/usercopy.c +2 -1
@@ -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 ;
Signature · 1 line
2.34.1
PATCH 25/30 KVM: arm64: vgic-v3: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- arch/arm64/kvm/vgic/vgic-v3.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/arm64/kvm/vgic/vgic-v3.c +5 -4
@@ -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);
Signature · 1 line
2.34.1
PATCH 5/30 nvdimm: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/nvdimm/namespace_devs.c | 3 ++- drivers/nvdimm/pmem.c | 3 ++- drivers/nvdimm/region_devs.c | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-)
drivers/nvdimm/namespace_devs.c +2 -1
@@ -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;
drivers/nvdimm/pmem.c +2 -1
@@ -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);
drivers/nvdimm/region_devs.c +3 -2
@@ -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)
Signature · 1 line
2.34.1
PATCH 7/30 usb: core: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/usb/core/port.c | 3 ++- drivers/usb/core/sysfs.c | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-)
drivers/usb/core/port.c +2 -1
@@ -7,6 +7,7 @@* Author: Lan Tianyu <[email protected]> */ +#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;
drivers/usb/core/sysfs.c +4 -3
@@ -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)
Signature · 1 line
2.34.1
PATCH 8/30 usb: gadget: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- 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(-)
drivers/usb/gadget/configfs.c +2 -1
@@ -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;
drivers/usb/gadget/function/f_mass_storage.c +2 -1
@@ -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;
drivers/usb/gadget/function/storage_common.c +5 -4
@@ -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;
drivers/usb/gadget/function/u_serial.c +2 -1
@@ -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 coubool enable;int ret; - ret =strtobool (page, &enable); + ret =kstrtobool (page, &enable);if (ret)return ret;
drivers/usb/gadget/legacy/serial.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 9/30 ACPI: sysfs: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/acpi/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/acpi/sysfs.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 10/30 clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/clocksource/arm_arch_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/clocksource/arm_arch_timer.c +2 -1
@@ -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_EVstatic 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);
Signature · 1 line
2.34.1
PATCH 11/30 greybus: svc: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/greybus/svc.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 12/30 input: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/input/input.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/input/input.c +2 -1
@@ -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)
Signature · 1 line
2.34.1
PATCH 28/30 x86/xen: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- arch/x86/xen/enlighten_pv.c | 3 ++- arch/x86/xen/setup.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/xen/enlighten_pv.c +2 -1
@@ -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);
arch/x86/xen/setup.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 13/30 platform/chrome: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/platform/chrome/cros_ec_lightbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/platform/chrome/cros_ec_lightbar.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 14/30 powercap: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/powercap/powercap_sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/powercap/powercap_sys.c +2 -1
@@ -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);
Signature · 1 line
2.34.1
PATCH 15/30 video: fbdev: omapfb: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- 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(-)
drivers/video/fbdev/omap2/omapfb/dss/display-sysfs.c +4 -3
@@ -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;
drivers/video/fbdev/omap2/omapfb/dss/manager-sysfs.c +4 -3
@@ -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;
drivers/video/fbdev/omap2/omapfb/dss/overlay-sysfs.c +2 -1
@@ -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;
drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 17/30 initramfs: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- init/initramfs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
init/initramfs.c +7 -1
@@ -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);
Signature · 1 line
2.34.1
PATCH 16/30 cifs: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- fs/cifs/cifs_debug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
fs/cifs/cifs_debug.c +3 -2
@@ -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 ])) {
Signature · 1 line
2.34.1
PATCH 18/30 module: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- kernel/module/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/module/main.c +2 -1
@@ -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 ; }
Signature · 1 line
2.34.1
PATCH 19/30 kernel/params.c: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- kernel/params.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/params.c +2 -1
@@ -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);
Signature · 1 line
2.34.1
PATCH 22/30 Bluetooth: hci_debugfs: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- net/bluetooth/hci_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/bluetooth/hci_debugfs.c +2 -1
@@ -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 ))
Signature · 1 line
2.34.1
PATCH 24/30 arm64: cpufeature: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- arch/arm64/kernel/cpufeature.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm64/kernel/cpufeature.c +3 -2
@@ -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);
Signature · 7 lines
2.34.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 23/30 test_firmware: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- lib/test_firmware.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/test_firmware.c +2 -1
@@ -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;
Signature · 1 line
2.34.1
PATCH 27/30 KVM: x86/mmu: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- arch/x86/kvm/mmu/mmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/kvm/mmu/mmu.c +2 -1
@@ -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);
Signature · 1 line
2.34.1
PATCH 26/30 s390/ipl: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- arch/s390/kernel/ipl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
arch/s390/kernel/ipl.c +4 -3
@@ -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; }
Signature · 1 line
2.34.1
PATCH 30/30 kstrtox: Remove strtobool()
In reply to Christophe JAILLETstrtobool() is the same as kstrtobool().
All uses of strtobool() have been turned into kstrtobool().
So strtobool() can now be removed as well.
--- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/kernel.h +1 -1
@@ -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>
Signature · 1 line
2.34.1
PATCH 29/30 driver core: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETstrtobool() 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>)
---
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/[email protected]/
--- drivers/base/core.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/base/core.c +4 -3
@@ -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;
Signature · 1 line
2.34.1
Re: [PATCH 30/30] kstrtox: Remove strtobool()
In reply to Christophe JAILLETLe 01/11/2022 à 22:14, Christophe JAILLET a écrit :
Quoted 15 lines
strtobool()is the same askstrtobool().
All uses ofstrtobool()have been turned intokstrtobool().So
strtobool()can now be removed as well.Signed-off-by Christophe JAILLET <[email protected]>--- include/linux/kernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/linux/kernel.h +0
-0
include/linux/kernel.h line 26
Quoted 8 lines
include/linux/kernel.h +1
-1@@ -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
Re: [PATCH 11/30] greybus: svc: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Looks OK to me.
Quoted 35 lines
---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- drivers/greybus/svc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/greybus/svc.c +2
-1@@ -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;
Re: [PATCH 20/30] mm/damon: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · On Tue, 1 Nov 2022 22:14:08 +0100 Christophe JAILLET…
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Thanks,
SJ
[...]
Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 13 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.
Quoted 6 lines
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 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
Signature · 1 line
Kees Cook
Re: [PATCH 28/30] x86/xen: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 13 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.
Quoted 6 lines
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].
Jakub Kicinski
maintainerRe: [PATCH 01/30] net: usb: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · 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].
Please repost this patch separately. Patch bots and CIs will not test partially received series.
Re: [PATCH 13/30] platform/chrome: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETThis patch was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Hello:
This patch was applied to chrome-platform/linux.git (for-kernelci) by Tzung-Bi Shih <[email protected]>:
Quoted 9 lines · On Tue, 1 Nov 2022 22:14:01 +0100 you wrote:
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 13 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.
Quoted 7 lines
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].
I believe you have tested this patch thoroughly, with that,
-ck
Re: [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 29 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- drivers/target/target_core_configfs.c | 29 ++++++++++---------- drivers/target/target_core_fabric_configfs.c | 3 +- 2 files changed, 17 insertions(+), 15 deletions(-)drivers/target/target_core_configfs.c +0
-0
drivers/target/target_core_configfs.c line 14
Quoted 3 lines
drivers/target/target_core_configfs.c +0
-0@@ -12,6 +12,7 @@* ****************************************************************************/
I believe you have tested this patch thoroughly, with that,
-ck
Christoph Hellwig
maintainerRe: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETWhat 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.
Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
Le 02/11/2022 à 07:47, Christoph Hellwig a écrit :
Quoted 4 lines
What are th other 29 patches doing in this series? Due to the lack of context individual patches from series have to through
/dev/nullhere, 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/[email protected]/
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
Christoph Hellwig
maintainerRe: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
Quoted 1 line · Christophe JAILLET
What is the best strategy for sending such patches?
Just send them per subsystems as mini series or individual patches.
Re: [PATCH 06/30] nvme: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 15 lines · Christophe JAILLET
Le 02/11/2022 à 07:47, Christoph Hellwig a écrit :
Quoted 4 lines
What are th other 29 patches doing in this series? Due to the lack of context individual patches from series have to through
/dev/nullhere, sorry.Hi,
in each patch, in order to give some context, I wrote:
---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.The last patch of the serie removes the definition of
strtobool().
Quoted 8 lines
You may not be in copy of the cover letter. So, if needed, it is available at [1].
[1]:https://lore.kernel.org/all/[email protected]/
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
Quoted 10 lines
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
Re: [PATCH 11/30] greybus: svc: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Sure, why not:
Re: [PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 15 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.The last patch of the serie removes the definition of
strtobool().
Quoted 7 lines
You may not be in copy of the cover letter. So, if needed, it is available at [1].
[1]: https://lore.kernel.org/all/[email protected]/
--- drivers/clocksource/arm_arch_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Mark.
Quoted 25 lines
drivers/clocksource/arm_arch_timer.c +2
-1@@ -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_EVstatic 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);Signature · 1 line
2.34.1
Quoted 6 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.
Quoted 8 lines
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 :-)
Quoted 2 lines
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.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
In reply to Kees CookQuoted 1 line · Kees Cook
On Tue, Nov 01, 2022 at 10:14:09PM +0100, Christophe JAILLET wrote:
...
Quoted 2 lines
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.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 09/30] ACPI: sysfs: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 7 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)
Quoted 40 lines
Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- drivers/acpi/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/sysfs.c +2
-1@@ -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;Signature · 1 line
2.34.1
Signature · 2 lines
With Best Regards, Andy Shevchenko
Re: [PATCH 13/30] platform/chrome: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETThis patch was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Hello:
This patch was applied to chrome-platform/linux.git (for-next) by Tzung-Bi Shih <[email protected]>:
Quoted 9 lines · On Tue, 1 Nov 2022 22:14:01 +0100 you wrote:
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Re: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Luis
Re: [PATCH 14/30] powercap: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 37 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- drivers/powercap/powercap_sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/powercap/powercap_sys.c +1
-0@@ -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>
drivers/powercap/powercap_sys.c static ssize_t enabled_store(struct device *dev,
Quoted 9 lines
drivers/powercap/powercap_sys.c +1
-2@@ -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!
Re: [PATCH 09/30] ACPI: sysfs: Use kstrtobool() instead of strtobool()
In reply to Andy ShevchenkoQuoted 43 lines · Andy Shevchenko
Quoted 7 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Reviewed-by Andy Shevchenko <[email protected]>Quoted 31 lines
Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- drivers/acpi/sysfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/acpi/sysfs.c +1
-0@@ -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;
Quoted 6 lines
drivers/acpi/sysfs.c static ssize_t force_remove_store(struct kobject *kobj,
Quoted 6 lines
drivers/acpi/sysfs.c +1
-2- ret =strtobool (buf, &val); + ret =kstrtobool (buf, &val);if (ret <0 )return ret; --
Applied as 6.2 material, thanks!
Re: [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
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.
Signature · 1 line
Dmitry
Re: [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
Le 03/11/2022 à 21:46, Dmitry Torokhov a écrit :
Quoted 9 lines · Christophe JAILLET
Quoted 8 lines
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)
Quoted 9 lines
Quoted 1 line
Signed-off-by Christophe JAILLET <[email protected]>Acked-by Dmitry Torokhov <[email protected]>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
Re: [PATCH 21/30] mm: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 38 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- mm/page_table_check.c | 3 ++- mm/usercopy.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)mm/page_table_check.c +1
-0@@ -4,6 +4,7 @@* Copyright (c) 2021, Google LLC. * Pasha Tatashin <[email protected]> */ +#include <linux/kstrtox.h> #include <linux/mm.h> #include <linux/page_table_check.h>
mm/page_table_check.c EXPORT_SYMBOL(page_table_check_disabled); · line 28
Quoted 6 lines
mm/page_table_check.c +1
-1@@ -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); }
Quoted 26 lines
mm/page_table_check.c +0
-0early_param ("page_table_check" , early_page_table_check_param);mm/usercopy.c +2
-2@@ -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
Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 47 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- kernel/module/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)kernel/module/main.c +2
-1@@ -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 ; }Signature · 1 line
2.34.1
Signature · 1 line
Aaron Tomlin
Dmitry Torokhov
maintainerRe: [PATCH 12/30] input: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 17 lines · Christophe JAILLET
Le 03/11/2022 à 21:46, Dmitry Torokhov a écrit :
Quoted 16 lines · Christophe JAILLET
Quoted 9 lines
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>Acked-by Dmitry Torokhov <[email protected]>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.
Quoted 8 lines
Quoted 2 lines
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.
Signature · 1 line
Dmitry
Martin K. Petersen
AppliedRe: [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETChristophe,
Quoted 2 lines
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.
Applied to 6.2/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Re: [PATCH 02/30] wifi: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Patch applied to wireless-next.git, thanks.
417f173532cc wifi: Use kstrtobool() instead of strtobool()
Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/1ff34549af5ad6f7c80d5b9e11872b5499065fc1.1667336095.git.christophe.jaillet@wanadoo.fr/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Re: [PATCH 26/30] s390/ipl: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Applied, thanks!
Martin K. Petersen
AppliedRe: [PATCH 04/30] scsi: target: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.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
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Marc Zyngier
maintainerRe: [PATCH 03/30] irqchip: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 14 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.
Quoted 7 lines
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.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Re: [PATCH 03/30] irqchip: Use kstrtobool() instead of strtobool()
Le 26/11/2022 à 13:46, Marc Zyngier a écrit :
Quoted 22 lines
Quoted 20 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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].
Quoted 5 lines
Quoted 1 line
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
Quoted 5 lines
Thanks,
M.
Daniel Lezcano
AppliedRe: [PATCH 10/30] clocksource/drivers/arm_arch_timer: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 36 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). 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/[email protected]/
--- drivers/clocksource/arm_arch_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/clocksource/arm_arch_timer.c +1
-0@@ -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>
drivers/clocksource/arm_arch_timer.c static bool evtstrm_enable __ro_after_init = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EV · line 104
Quoted 8 lines
drivers/clocksource/arm_arch_timer.c +1
-1@@ -97,7 +98,7 @@ static bool evtstrm_enable __ro_after_init = IS_ENABLED(CONFIG_ARM_ARCH_TIMER_EVstatic 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
Signature · 5 lines
<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
Re: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
In reply to Catalin MarinasLe 02/11/2022 à 14:46, Catalin Marinas a écrit :
Quoted 13 lines · Christophe JAILLET
Quoted 9 lines
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>Acked-by Catalin Marinas <[email protected]>
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
Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
In reply to Luis ChamberlainLe 02/11/2022 à 19:41, Luis Chamberlain a écrit :
Quoted 7 lines · Christophe JAILLET
Quoted 6 lines
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.
Quoted 8 lines
Quoted 3 lines
While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>Reviewed-by Luis Chamberlain <[email protected]>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
Catalin Marinas
maintainerRe: [PATCH 24/30] arm64: cpufeature: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 12 lines · Christophe JAILLET
Le 02/11/2022 à 14:46, Catalin Marinas a écrit :
Quoted 11 lines · Christophe JAILLET
Quoted 9 lines
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>
Quoted 8 lines
Quoted 1 line
Acked-by Catalin Marinas <[email protected]>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.
Signature · 6 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 18/30] module: Use kstrtobool() instead of strtobool()
In reply to Christophe JAILLETQuoted 13 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.h, switch to the other function name.While at it, include the corresponding header file (<
linux/kstrtox.h>)Signed-off-by Christophe JAILLET <[email protected]>---
This patch is part of a serie that axes all usages ofstrtobool(). Each patch can be applied independently from the other ones.
Quoted 7 lines
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].
Queued up to modules-next.
Luis
Re: (subset) [PATCH 00/30] Remove strtobool()
In reply to Christophe JAILLETQuoted 9 lines · Christophe JAILLET
strtobool()is the same askstrtobool(). However, the latter is more used within the kernel.In order to remove
strtobool()and slightly simplifykstrtox.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
Signature · 1 line
Catalin