summaryrefslogtreecommitdiffstats
path: root/include/linux/hwmon-sysfs.h
diff options
context:
space:
mode:
authorDaniel Santos <daniel.santos@pobox.com>2013-02-21 16:41:52 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-21 17:22:16 -0800
commita3ccc497cd17147713363a4bf975f1a269fadb6d (patch)
tree6c5e14d9b9f8687edba0ee5a604277433d4db7d2 /include/linux/hwmon-sysfs.h
parent1d6a0d19c85587581a364850b77f30446810a560 (diff)
bug.h: make BUILD_BUG_ON generate compile-time error
Negative sized arrays wont create a compile-time error in some cases starting with gcc 4.4 (e.g., inlined functions), but gcc 4.3 introduced the error function attribute that will. This patch modifies BUILD_BUG_ON to behave like BUILD_BUG already does, using the error function attribute so that you don't have to build the entire kernel to discover that you have a problem, and then enjoy trying to track it down from a link-time error. Also, we are only including asm/bug.h and then expecting that linux/compiler.h will eventually be included to define __linktime_error (used in BUILD_BUG_ON). This patch includes it directly for clarity and to avoid the possibility of changes in <arch>/*/include/asm/bug.h being changed or not including linux/compiler.h for some reason. Signed-off-by: Daniel Santos <daniel.santos@pobox.com> Acked-by: Borislav Petkov <bp@alien8.de> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Rientjes <rientjes@google.com> Cc: Joe Perches <joe@perches.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/hwmon-sysfs.h')
0 files changed, 0 insertions, 0 deletions