linux-stable/arch
Eugeniy Paltsev 87142f7638 ARC: fix __ffs return value to avoid build warnings
[ Upstream commit 4e868f8419 ]

|  CC      mm/nobootmem.o
|In file included from ./include/asm-generic/bug.h:18:0,
|                 from ./arch/arc/include/asm/bug.h:32,
|                 from ./include/linux/bug.h:5,
|                 from ./include/linux/mmdebug.h:5,
|                 from ./include/linux/gfp.h:5,
|                 from ./include/linux/slab.h:15,
|                 from mm/nobootmem.c:14:
|mm/nobootmem.c: In function '__free_pages_memory':
|./include/linux/kernel.h:845:29: warning: comparison of distinct pointer types lacks a cast
|   (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
|                             ^
|./include/linux/kernel.h:859:4: note: in expansion of macro '__typecheck'
|   (__typecheck(x, y) && __no_side_effects(x, y))
|    ^~~~~~~~~~~
|./include/linux/kernel.h:869:24: note: in expansion of macro '__safe_cmp'
|  __builtin_choose_expr(__safe_cmp(x, y), \
|                        ^~~~~~~~~~
|./include/linux/kernel.h:878:19: note: in expansion of macro '__careful_cmp'
| #define min(x, y) __careful_cmp(x, y, <)
|                   ^~~~~~~~~~~~~
|mm/nobootmem.c:104:11: note: in expansion of macro 'min'
|   order = min(MAX_ORDER - 1UL, __ffs(start));

Change __ffs return value from 'int' to 'unsigned long' as it
is done in other implementations (like asm-generic, x86, etc...)
to avoid build-time warnings in places where type is strictly
checked.

As __ffs may return values in [0-31] interval changing return
type to unsigned is valid.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-05 17:57:59 +01:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:20:53 +01:00
arc ARC: fix __ffs return value to avoid build warnings 2019-03-05 17:57:59 +01:00
arm ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction 2019-02-27 10:08:01 +01:00
arm64 arm64: ftrace: don't adjust the LR value 2019-02-12 19:46:01 +01:00
blackfin
c6x
cris bug.h: work around GCC PR82365 in BUG() 2018-05-30 07:52:00 +02:00
frv
h8300 h8300: remove extraneous __BIG_ENDIAN definition 2018-03-28 18:24:38 +02:00
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:54:25 +02:00
ia64 ia64/err-inject: Use get_user_pages_fast() 2018-05-30 07:52:11 +02:00
m32r m32r: fix endianness constraints 2018-02-28 10:19:44 +01:00
m68k m68k: fix "bad page state" oops on ColdFire boot 2018-08-24 13:09:11 +02:00
metag
microblaze microblaze: Fix simpleImage format generation 2018-08-03 07:50:40 +02:00
mips MIPS: jazz: fix 64bit build 2019-02-27 10:08:04 +01:00
mn10300 mn10300/misalignment: Use SIGSEGV SEGV_MAPERR to report a failed user copy 2018-02-16 20:23:11 +01:00
nios2
openrisc openrisc: entry: Fix delay slot exception detection 2018-08-24 13:09:11 +02:00
parisc parisc: Fix ptrace syscall number modification 2019-02-27 10:08:07 +01:00
powerpc powerpc/fadump: Do not allow hot-remove memory from fadump reserved area. 2019-02-12 19:46:07 +01:00
s390 s390/zcrypt: improve special ap message cmd handling 2019-02-12 19:46:01 +01:00
score
sh sh: fix build failure for J2 cpu with SMP disabled 2018-06-21 04:02:54 +09:00
sparc sparc64: Make proc_id signed. 2018-11-13 11:14:50 -08:00
tile
um um: Avoid marking pages with "changed protection" 2019-02-12 19:46:08 +01:00
unicore32 kmemcheck: stop using GFP_NOTRACK and SLAB_NOTRACK 2018-02-22 15:42:23 +01:00
x86 always clear the X2APIC_ENABLE bit for PV guest 2019-02-27 10:08:05 +01:00
xtensa xtensa: fix coprocessor part of ptrace_{get,set}xregs 2018-12-05 19:41:23 +01:00
.gitignore
Kconfig compiler.h: Allow arch-specific asm/compiler.h 2018-11-04 14:52:46 +01:00