mm/memblock: introduce PHYS_ADDR_MAX
authorStefan Agner <[email protected]>
Fri, 8 Jun 2018 00:06:15 +0000 (17:06 -0700)
committerLinus Torvalds <[email protected]>
Fri, 8 Jun 2018 00:34:35 +0000 (17:34 -0700)
commit1c4bc43ddfd52cbe5a08bb86ae636f55d2799424
treea1906e4a78501f342ac493dbda67b8f83c6b8773
parent00b3a331fdf7f1466ac93a008ccd2dab45cb46c5
mm/memblock: introduce PHYS_ADDR_MAX

So far code was using ULLONG_MAX and type casting to obtain a
phys_addr_t with all bits set.  The typecast is necessary to silence
compiler warnings on 32-bit platforms.

Use the simpler but still type safe approach "~(phys_addr_t)0" to create a
preprocessor define for all bits set.

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Stefan Agner <[email protected]>
Suggested-by: Linus Torvalds <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: Andrew Morton <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/kernel.h
mm/memblock.c