]> git.baikalelectronics.ru Git - kernel.git/commit
mm: prevent a warning when casting void* -> enum
authorPalmer Dabbelt <palmerdabbelt@google.com>
Tue, 7 Apr 2020 03:08:00 +0000 (20:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2020 17:43:41 +0000 (10:43 -0700)
commitaa5a31a47bb9a92221b29f52580be15eccebda7f
tree0c2b85f3516c7054cea900eb7755f7a30f741344
parent3ee39f5ffe63d706ced75bb4e3d16491a6eed2ad
mm: prevent a warning when casting void* -> enum

I recently build the RISC-V port with LLVM trunk, which has introduced a
new warning when casting from a pointer to an enum of a smaller size.
This patch simply casts to a long in the middle to stop the warning.  I'd
be surprised this is the only one in the kernel, but it's the only one I
saw.

Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/20200227211741.83165-1-palmer@dabbelt.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/rmap.c