ARRAY_SIZE: check for type
We can use a gcc extension to ensure that ARRAY_SIZE() is handed an array, not a pointer. This is especially important when code is changed from a fixed array to a pointer. I assume the Intel compiler doesn't support __builtin_types_compatible_p. [jdike@addtoit.com: uml: update UML definition of ARRAY_SIZE] Signed-off-by:Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Jeff Dike <jdike@linux.intel.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Showing
- arch/um/include/user_util.h 13 additions, 2 deletionsarch/um/include/user_util.h
- include/linux/compiler-gcc.h 3 additions, 0 deletionsinclude/linux/compiler-gcc.h
- include/linux/compiler-intel.h 3 additions, 0 deletionsinclude/linux/compiler-intel.h
- include/linux/kernel.h 2 additions, 1 deletioninclude/linux/kernel.h
Please register or sign in to comment