]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
nvdimm: use 'u64' for pfn flags
authorArnd Bergmann <arnd@arndb.de>
Mon, 22 Feb 2016 21:58:34 +0000 (22:58 +0100)
committerDan Williams <dan.j.williams@intel.com>
Wed, 24 Feb 2016 01:17:20 +0000 (17:17 -0800)
commitc45442055dfdeb265cc20c9eeaa9fd11a75fbf51
treeec9c304ceb425db702af367028cb9861684fe30e
parent93f834df9c2d4e362dfdc4b05daa0a4e18814836
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>
drivers/nvdimm/pmem.c