mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
include/linux/compiler-gcc.h: use __same_type() in __must_be_array()
We should use the __same_type() helper in __must_be_array(). Signed-off-by: Rusty Russell <[email protected]> Reported-by: Andrew Morton <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7387be3373
commit
ea6b101d8a
1 changed files with 1 additions and 2 deletions
|
|
@ -35,8 +35,7 @@
|
|||
(typeof(ptr)) (__ptr + (off)); })
|
||||
|
||||
/* &a[0] degrades to a pointer: a different type from an array */
|
||||
#define __must_be_array(a) \
|
||||
BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
|
||||
#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0]))
|
||||
|
||||
/*
|
||||
* Force always-inline if the user requests it so via the .config,
|
||||
|
|
|
|||
Loading…
Reference in a new issue