powerpc/lib: Fix "integer constant is too large" build failure
authorFinn Thain <fthain@telegraphics.com.au>
Fri, 18 May 2018 01:18:33 +0000 (11:18 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 May 2018 06:04:02 +0000 (16:04 +1000)
commit20acf7fc9409e48cfbfb38262aa53466dfbc22bb
tree5e77597e6fd57aab74c245dffa8b144b0dea6229
parentc0beffc4f4c658fde86d52c837e784326e9cc875
powerpc/lib: Fix "integer constant is too large" build failure

My powerpc-linux-gnu-gcc v4.4.5 compiler can't build a 32-bit kernel
any more:

arch/powerpc/lib/sstep.c: In function 'do_popcnt':
arch/powerpc/lib/sstep.c:1068: error: integer constant is too large for 'long' type
arch/powerpc/lib/sstep.c:1069: error: integer constant is too large for 'long' type
arch/powerpc/lib/sstep.c:1069: error: integer constant is too large for 'long' type
arch/powerpc/lib/sstep.c:1070: error: integer constant is too large for 'long' type
arch/powerpc/lib/sstep.c:1079: error: integer constant is too large for 'long' type
arch/powerpc/lib/sstep.c: In function 'do_prty':
arch/powerpc/lib/sstep.c:1117: error: integer constant is too large for 'long' type

This file gets compiled with -std=gnu89 which means a constant can be
given the type 'long' even if it won't fit. Fix the errors with a 'ULL'
suffix on the relevant constants.

Fixes: 2c979c489fee ("powerpc/lib/sstep: Add prty instruction emulation")
Fixes: dcbd19b48d31 ("powerpc/lib/sstep: Add popcnt instruction emulation")
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/sstep.c