diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-12-10 17:12:05 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-12-10 17:12:05 +0100 |
commit | af7d9f0c57941b465043681cb5c3410f7f3f1a41 (patch) | |
tree | 93e5054fb054b777207854ae1057359d8427cb3c /drivers/nvdimm/pfn_devs.c | |
parent | libnvdimm, e820: use module_platform_driver (diff) | |
download | linux-af7d9f0c57941b465043681cb5c3410f7f3f1a41.tar.xz linux-af7d9f0c57941b465043681cb5c3410f7f3f1a41.zip |
libnvdimm, pfn: fix align attribute
Fix the format specifier so that the attribute can be parsed correctly.
Currently it returns decimal 1000 for a 4096-byte alignment.
Cc: <stable@vger.kernel.org>
Reported-by: Dave Jiang <dave.jiang@intel.com>
Fixes: 315c562536c4 ("libnvdimm, pfn: add 'align' attribute, default to HPAGE_SIZE")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/pfn_devs.c')
-rw-r--r-- | drivers/nvdimm/pfn_devs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c index cea8350fbc7e..a2ac9e641aa9 100644 --- a/drivers/nvdimm/pfn_devs.c +++ b/drivers/nvdimm/pfn_devs.c @@ -108,7 +108,7 @@ static ssize_t align_show(struct device *dev, { struct nd_pfn *nd_pfn = to_nd_pfn_safe(dev); - return sprintf(buf, "%lx\n", nd_pfn->align); + return sprintf(buf, "%ld\n", nd_pfn->align); } static ssize_t __align_store(struct nd_pfn *nd_pfn, const char *buf) |