]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/userfaultfd: fix compiler warnings on 32-bit
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 8 Sep 2015 21:58:25 +0000 (14:58 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 18:53:16 +0000 (13:53 -0500)
commit934123ab260fae406f851200f730a2a4b2cbaec1
tree79a25a124c5267d2530e819574dbc0078cbbb35e
parent318e761bdf218d6135d0cc4da918652bc3e2fec5
selftests/userfaultfd: fix compiler warnings on 32-bit

Orabug: 21685254

On 32-bit:

    userfaultfd.c: In function 'locking_thread':
    userfaultfd.c:152: warning: left shift count >= width of type
    userfaultfd.c: In function 'uffd_poll_thread':
    userfaultfd.c:295: warning: cast to pointer from integer of different size
    userfaultfd.c: In function 'uffd_read_thread':
    userfaultfd.c:332: warning: cast to pointer from integer of different size

Fix the shift warning by splitting the shift in two parts, and the
integer/pointer warnigns by adding intermediate casts to "unsigned long".

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit af8713b701a74c3784ce6683f64f474a94b1b643)
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
tools/testing/selftests/vm/userfaultfd.c