David Daney
1399ff86f2
kernel.h: add BUILD_BUG() macro
...
We can place this in definitions that we expect the compiler to remove by
dead code elimination. If this assertion fails, we get a nice error
message at build time.
The GCC function attribute error("message") was added in version 4.3, so
we define a new macro __linktime_error(message) to expand to this for
GCC-4.3 and later. This will give us an error diagnostic from the
compiler on the line that fails. For other compilers
__linktime_error(message) expands to nothing, and we have to be content
with a link time error, but at least we will still get a build error.
BUILD_BUG() expands to the undefined function __build_bug_failed() and
will fail at link time if the compiler ever emits code for it. On GCC-4.3
and later, attribute((error())) is used so that the failure will be noted
at compile time instead.
Signed-off-by: David Daney <david.daney@cavium.com >
Acked-by: David Rientjes <rientjes@google.com >
Cc: DM <dm.n9107@gmail.com >
Cc: Ralf Baechle <ralf@linux-mips.org >
Acked-by: David Howells <dhowells@redhat.com >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2012-01-10 16:30:42 -08:00
..
2012-01-09 14:28:38 -08:00
2011-12-13 15:31:27 -05:00
2011-12-01 13:09:31 -05:00
2011-12-11 18:25:16 -05:00
2011-12-15 14:52:37 +08:00
2011-12-19 14:57:07 -05:00
2011-12-10 16:18:35 -05:00
2012-01-09 13:08:28 -08:00
2011-12-27 20:31:38 +01:00
2012-01-09 14:21:03 -08:00
2011-12-23 10:17:51 +11:00
2011-11-17 12:15:39 -08:00
2011-12-13 15:30:49 -05:00
2012-01-08 12:19:57 -08:00
2012-01-04 15:52:42 -08:00
2011-12-13 18:46:56 -05:00
2011-11-26 16:40:30 -05:00
2012-01-03 22:55:17 -05:00
2011-12-06 08:33:54 +01:00
2011-11-23 10:59:13 +01:00
2011-11-22 15:22:23 -05:00
2012-01-09 12:59:24 -08:00
2011-12-28 21:25:35 +08:00
2011-12-19 11:41:40 +01:00
2012-01-03 22:55:19 -05:00
2012-01-10 16:30:42 -08:00
2012-01-10 16:30:42 -08:00
2012-01-03 22:54:57 -05:00
2012-01-07 12:03:30 -08:00
2011-12-08 13:57:20 +11:00
2012-01-09 19:23:45 -05:00
2012-01-08 12:19:57 -08:00
2011-11-23 18:49:22 +01:00
2012-01-08 12:19:57 -08:00
2011-12-16 08:49:57 -08:00
2012-01-06 10:20:21 +00:00
2011-11-29 12:46:19 -05:00
2011-12-14 15:21:07 -08:00
2011-11-26 14:59:39 -05:00
2011-12-11 18:25:16 -05:00
2012-01-04 14:10:28 -05:00
2012-01-03 22:54:58 -05:00
2011-12-27 01:06:33 +01:00
2012-01-06 23:20:13 -05:00
2011-12-05 13:28:45 -05:00
2011-12-03 09:35:08 -08:00
2012-01-03 22:54:55 -05:00
2012-01-10 16:30:42 -08:00
2011-12-11 10:31:24 -08:00
2011-11-19 06:15:59 -05:00
2012-01-04 16:13:05 -08:00
2012-01-06 11:42:52 -08:00
2012-01-03 22:54:56 -05:00
2011-12-13 15:30:40 -05:00
2011-12-05 18:27:56 -05:00
2011-12-08 19:52:42 -05:00
2011-12-30 16:42:19 -05:00
2012-01-09 12:59:24 -08:00
2012-01-03 22:55:17 -05:00
2011-12-11 18:25:16 -05:00
2011-12-23 22:33:58 +00:00
2012-01-03 22:54:55 -05:00
2012-01-09 13:52:09 +01:00
2011-12-06 20:41:03 +01:00
2011-12-30 16:42:19 -05:00
2011-12-06 09:06:38 +01:00
2012-01-10 16:30:42 -08:00
2011-12-09 23:36:36 +01:00
2011-12-21 15:13:54 -08:00
2011-12-14 11:19:07 -08:00
2011-11-21 12:32:23 -08:00
2011-12-26 13:27:44 +02:00
2011-12-22 02:02:20 -05:00
2011-12-12 22:06:55 -08:00
2011-12-13 18:46:55 -05:00
2011-12-08 10:22:09 -08:00
2012-01-09 13:44:23 -08:00
2011-12-21 14:48:43 -08:00
2011-11-21 15:27:19 -05:00
2012-01-03 22:55:15 -05:00
2011-12-20 12:14:26 +01:00
2011-12-08 10:22:09 -08:00
2012-01-03 22:57:13 -05:00
2011-11-22 10:58:30 +00:00
2012-01-03 22:57:12 -05:00
2012-01-09 14:46:52 -08:00
2011-11-21 16:38:08 -05:00
2011-12-06 13:57:36 -05:00
2012-01-04 14:30:43 -05:00
2012-01-03 22:52:34 -05:00
2011-12-19 14:34:13 -05:00
2011-11-18 10:51:01 -08:00
2011-12-21 14:48:43 -08:00
2011-12-27 10:57:13 -06:00
2011-12-12 13:40:16 -07:00
2012-01-07 12:18:52 -08:00
2011-12-03 09:35:17 -08:00
2012-01-10 16:30:41 -08:00
2011-12-05 18:13:11 +01:00
2011-12-22 10:40:20 -08:00
2011-12-21 10:26:37 +01:00
2011-11-18 14:37:40 -05:00
2012-01-05 14:01:21 -05:00
2012-01-08 13:10:57 -08:00
2011-12-09 23:22:41 +01:00
2011-12-25 23:43:11 +01:00
2011-12-01 21:46:42 +01:00
2011-12-25 23:43:05 +01:00
2011-12-08 10:22:07 -08:00
2012-01-03 22:54:56 -05:00
2011-11-17 13:13:29 -08:00
2012-01-03 22:55:07 -05:00
2011-12-11 10:32:06 -08:00
2011-12-05 16:21:05 +00:00
2012-01-06 23:20:13 -05:00
2012-01-06 23:20:13 -05:00
2012-01-03 22:54:56 -05:00
2012-01-09 12:59:24 -08:00
2012-01-08 13:21:22 -08:00
2012-01-03 22:52:40 -05:00
2011-12-09 19:14:13 -08:00
2011-11-26 20:11:20 -08:00
2011-12-25 23:39:11 +01:00
2012-01-03 22:55:07 -05:00
2011-12-09 07:50:27 -08:00
2011-11-29 11:59:50 +00:00
2012-01-05 14:01:21 -05:00
2012-01-09 14:19:33 -08:00
2012-01-03 20:23:18 -05:00
2011-12-30 16:42:19 -05:00
2011-12-11 10:32:06 -08:00
2011-12-08 23:22:21 +01:00
2012-01-03 22:55:19 -05:00
2012-01-03 22:55:12 -05:00
2012-01-03 22:54:56 -05:00
2011-12-21 01:03:23 -05:00
2011-12-11 10:31:57 -08:00
2012-01-08 13:21:22 -08:00
2011-12-30 16:46:02 -05:00
2012-01-09 12:09:47 -08:00
2011-12-02 13:49:21 -05:00
2011-11-24 13:04:47 +10:30
2011-12-05 23:27:59 +00:00
2011-12-21 10:07:39 +01:00
2011-12-02 14:57:31 +01:00
2012-01-10 16:30:41 -08:00