projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7387be3
)
include/linux/compiler-gcc.h: use __same_type() in __must_be_array()
author
Rusty Russell
<
[email protected]
>
Tue, 10 Aug 2010 00:20:18 +0000
(17:20 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 10 Aug 2010 03:45:04 +0000
(20:45 -0700)
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]
>
include/linux/compiler-gcc.h
patch
|
blob
|
history
diff --git
a/include/linux/compiler-gcc.h
b/include/linux/compiler-gcc.h
index 0da5b187f1245e8c33fd659420f5e4dca82b9ead..16508bcddaccdb12490ce70a357c54be69643000 100644
(file)
--- a/
include/linux/compiler-gcc.h
+++ b/
include/linux/compiler-gcc.h
@@
-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,