diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-07-13 07:50:09 +0300 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2023-07-19 18:42:50 +0300 |
commit | 44f23dabdc08698b7a066300eb55db23895f5459 (patch) | |
tree | f8dbfdfd3f37b5c6b2c1c79c58e871c64fc68d51 /drivers/nvdimm/pmem.c | |
parent | fdf0eaf11452d72945af31804e2a1048ee1b574c (diff) | |
download | linux-44f23dabdc08698b7a066300eb55db23895f5459.tar.xz |
nvdimm: 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>)
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'drivers/nvdimm/pmem.c')
-rw-r--r-- | drivers/nvdimm/pmem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 46e094e56159..4e8fdcb3f1c8 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@ -17,6 +17,7 @@ #include <linux/moduleparam.h> #include <linux/badblocks.h> #include <linux/memremap.h> +#include <linux/kstrtox.h> #include <linux/vmalloc.h> #include <linux/blk-mq.h> #include <linux/pfn_t.h> @@ -385,7 +386,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); |