diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2022-11-25 00:28:12 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-12-06 11:16:56 +0300 |
commit | 99722c8aa8b994db15ef60965c33f6a8e399b36c (patch) | |
tree | 6b693f22e02cc4770309a7d1527baf24f0c15275 /drivers/nvme/host | |
parent | ba0718a6d67130fd4bff664b86d2aa63fa49e241 (diff) | |
download | linux-99722c8aa8b994db15ef60965c33f6a8e399b36c.tar.xz |
nvme: use kstrtobool() instead of strtobool()
strtobool() is the same as kstrtobool().
However, the latter is more used within the kernel.
In order to remove strtobool() and slightly simplify kstrtox.h, switch to
the other function name.
While at it, include the corresponding header file (<linux/kstrtox.h>)
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host')
-rw-r--r-- | drivers/nvme/host/pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index bd5fcdc9211c..e0da4a6719a7 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -15,6 +15,7 @@ #include <linux/init.h> #include <linux/interrupt.h> #include <linux/io.h> +#include <linux/kstrtox.h> #include <linux/memremap.h> #include <linux/mm.h> #include <linux/module.h> @@ -2184,7 +2185,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) |