diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-02-22 16:58:34 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-02-23 20:17:20 -0500 |
commit | c45442055dfdeb265cc20c9eeaa9fd11a75fbf51 (patch) | |
tree | ec9c304ceb425db702af367028cb9861684fe30e | |
parent | 93f834df9c2d4e362dfdc4b05daa0a4e18814836 (diff) |
nvdimm: use 'u64' for pfn flags
A recent bugfix changed pfn_t to always be 64-bit wide, but did not
change the code in pmem.c, which is now broken on 32-bit architectures
as reported by gcc:
In file included from ../drivers/nvdimm/pmem.c:28:0:
drivers/nvdimm/pmem.c: In function 'pmem_alloc':
include/linux/pfn_t.h:15:17: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
#define PFN_DEV (1ULL << (BITS_PER_LONG_LONG - 3))
This changes the intermediate pfn_flags in struct pmem_device to
be 64 bit wide as well, so they can store the flags correctly.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: db78c22230d0 ("mm: fix pfn_t vs highmem")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/nvdimm/pmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c index 7edf31671dab..8d0b54670184 100644 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c | |||
@@ -41,7 +41,7 @@ struct pmem_device { | |||
41 | phys_addr_t phys_addr; | 41 | phys_addr_t phys_addr; |
42 | /* when non-zero this device is hosting a 'pfn' instance */ | 42 | /* when non-zero this device is hosting a 'pfn' instance */ |
43 | phys_addr_t data_offset; | 43 | phys_addr_t data_offset; |
44 | unsigned long pfn_flags; | 44 | u64 pfn_flags; |
45 | void __pmem *virt_addr; | 45 | void __pmem *virt_addr; |
46 | size_t size; | 46 | size_t size; |
47 | struct badblocks bb; | 47 | struct badblocks bb; |