projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
82bf103
)
nvdimm: use the right length of "pmem"
author
Nicolas Iooss
<nicolas.iooss_linux@m4x.org>
Sat, 29 Oct 2016 11:28:52 +0000
(13:28 +0200)
committer
Dan Williams
<dan.j.williams@intel.com>
Sat, 12 Nov 2016 04:37:42 +0000
(20:37 -0800)
In order to test that the name of a resource begins with "pmem", call
strncmp() with 4 as length instead of 3 to match the whole prefix.
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/nvdimm/label.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvdimm/label.c
b/drivers/nvdimm/label.c
index fac7cabe8f563e8e0e08b97f79aeb4f86174f66f..dd615345699fddf38f9117344278bf9364afe547 100644
(file)
--- a/
drivers/nvdimm/label.c
+++ b/
drivers/nvdimm/label.c
@@
-938,7
+938,7
@@
int nd_pmem_namespace_label_update(struct nd_region *nd_region,
}
for_each_dpa_resource(ndd, res)
- if (strncmp(res->name, "pmem",
3
) == 0)
+ if (strncmp(res->name, "pmem",
4
) == 0)
count++;
WARN_ON_ONCE(!count);