mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
libnvdimm, pfn: fix align attribute
commitaf7d9f0c57upstream. Fix the format specifier so that the attribute can be parsed correctly. Currently it returns decimal 1000 for a 4096-byte alignment. Reported-by: Dave Jiang <dave.jiang@intel.com> Fixes:315c562536("libnvdimm, pfn: add 'align' attribute, default to HPAGE_SIZE") Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6838ac1253
commit
630a2ef354
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user