Linus Torvalds
ed2d265d12
Merge tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux
...
Pull <linux/bug.h> cleanup from Paul Gortmaker:
"The changes shown here are to unify linux's BUG support under the one
<linux/bug.h> file. Due to historical reasons, we have some BUG code
in bug.h and some in kernel.h -- i.e. the support for BUILD_BUG in
linux/kernel.h predates the addition of linux/bug.h, but old code in
kernel.h wasn't moved to bug.h at that time. As a band-aid, kernel.h
was including <asm/bug.h> to pseudo link them.
This has caused confusion[1] and general yuck/WTF[2] reactions. Here
is an example that violates the principle of least surprise:
CC lib/string.o
lib/string.c: In function 'strlcat':
lib/string.c:225:2: error: implicit declaration of function 'BUILD_BUG_ON'
make[2]: *** [lib/string.o] Error 1
$
$ grep linux/bug.h lib/string.c
#include <linux/bug.h>
$
We've included <linux/bug.h> for the BUG infrastructure and yet we
still get a compile fail! [We've not kernel.h for BUILD_BUG_ON.] Ugh -
very confusing for someone who is new to kernel development.
With the above in mind, the goals of this changeset are:
1) find and fix any include/*.h files that were relying on the
implicit presence of BUG code.
2) find and fix any C files that were consuming kernel.h and hence
relying on implicitly getting some/all BUG code.
3) Move the BUG related code living in kernel.h to <linux/bug.h>
4) remove the asm/bug.h from kernel.h to finally break the chain.
During development, the order was more like 3-4, build-test, 1-2. But
to ensure that git history for bisect doesn't get needless build
failures introduced, the commits have been reorderd to fix the problem
areas in advance.
[1] https://lkml.org/lkml/2012/1/3/90
[2] https://lkml.org/lkml/2012/1/17/414 "
Fix up conflicts (new radeon file, reiserfs header cleanups) as per Paul
and linux-next.
* tag 'bug-for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
kernel.h: doesn't explicitly use bug.h, so don't include it.
bug: consolidate BUILD_BUG_ON with other bug code
BUG: headers with BUG/BUG_ON etc. need linux/bug.h
bug.h: add include of it to various implicit C users
lib: fix implicit users of kernel.h for TAINT_WARN
spinlock: macroize assert_spin_locked to avoid bug.h dependency
x86: relocate get/set debugreg fcns to include/asm/debugreg.
2012-03-24 10:08:39 -07:00
..
2009-08-03 09:05:00 +01:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-08-17 18:32:09 -07:00
2009-12-12 13:08:14 +01:00
2008-12-09 00:50:13 -08:00
2008-08-31 20:59:37 -07:00
2011-12-27 16:33:13 -05:00
2011-07-26 16:49:47 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2010-08-18 22:53:26 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-03-23 19:46:22 -07:00
2011-08-02 21:28:53 -07:00
2008-07-27 23:00:59 +02:00
2009-06-11 21:02:14 +02:00
2009-11-27 17:33:43 -08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-09-02 00:49:38 -07:00
2009-01-14 19:56:50 -08:00
2010-06-29 00:38:02 -07:00
2009-11-26 09:16:19 +01:00
2009-11-26 09:16:19 +01:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-10-28 14:58:53 +02:00
2008-07-27 23:00:59 +02:00
2011-05-16 13:07:43 -07:00
2010-04-12 22:37:07 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2010-07-24 09:57:52 -06:00
2008-07-27 23:00:59 +02:00
2010-08-11 08:59:21 -07:00
2008-08-29 02:15:23 -07:00
2008-08-29 23:10:21 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-12-16 07:20:12 -08:00
2011-07-28 23:31:26 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-03-17 13:08:27 -03:00
2008-07-27 23:00:59 +02:00
2010-08-16 12:26:09 -07:00
2010-02-05 12:22:42 +01:00
2011-03-16 09:54:02 -04:00
2008-08-31 20:56:15 -07:00
2008-07-27 23:00:59 +02:00
2011-06-07 16:06:34 -07:00
2011-06-07 16:06:34 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-06-16 04:56:53 -07:00
2008-07-27 23:00:59 +02:00
2011-03-11 12:23:31 +01:00
2008-07-27 23:00:59 +02:00
2008-08-24 20:33:56 -07:00
2009-10-01 13:45:13 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2012-03-20 21:48:30 +08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-08-02 21:28:52 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-12-04 15:59:49 +02:00
2011-12-04 15:59:49 +02:00
2008-08-29 02:15:23 -07:00
2011-05-12 13:44:29 -07:00
2008-07-27 23:00:59 +02:00
2011-02-17 14:16:30 -08:00
2008-08-29 02:15:21 -07:00
2008-09-10 23:07:41 -07:00
2008-07-27 23:00:59 +02:00
2009-01-04 15:44:52 -08:00
2011-04-19 22:11:40 -07:00
2012-03-23 16:58:31 -07:00
2008-07-27 23:00:59 +02:00
2011-07-06 08:00:29 -07:00
2011-07-06 08:00:29 -07:00
2008-07-27 23:00:59 +02:00
2009-01-02 21:31:13 -08:00
2012-02-24 10:05:59 +01:00
2011-08-04 01:35:12 -07:00
2008-11-01 21:44:01 -07:00
2009-01-30 00:03:53 -08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-06-16 19:47:51 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-03-16 18:19:04 -07:00
2011-07-22 08:26:06 -07:00
2011-06-02 14:32:38 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-08-17 18:32:10 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-08-29 14:16:48 -07:00
2008-07-27 23:00:59 +02:00
2009-06-16 04:56:21 -07:00
2008-08-24 22:08:34 -07:00
2008-07-27 23:00:59 +02:00
2009-09-22 07:17:41 -07:00
2011-03-16 18:19:08 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-03-16 14:40:39 +10:30
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-06-27 14:13:09 -07:00
2008-12-26 15:35:41 -08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-09-10 06:28:20 -07:00
2011-03-31 11:26:23 -03:00
2008-09-08 15:40:45 -07:00
2010-11-30 14:33:29 -08:00
2008-07-27 23:00:59 +02:00
2011-01-03 12:15:12 -08:00
2010-12-12 14:57:53 -08:00
2008-07-27 23:00:59 +02:00
2011-12-29 14:58:31 -08:00
2009-06-11 21:02:17 +02:00
2008-07-27 23:00:59 +02:00
2010-01-12 02:46:16 -08:00
2011-02-28 01:36:39 -07:00
2008-07-27 23:00:59 +02:00
2012-02-23 20:19:04 -07:00
2012-02-23 20:19:04 -07:00
2010-03-12 15:52:42 -08:00
2011-06-02 14:32:37 -07:00
2011-03-31 11:26:23 -03:00
2008-07-27 23:00:59 +02:00
2009-06-16 04:56:23 -07:00
2008-07-27 23:00:59 +02:00
2010-11-26 15:14:56 +01:00
2010-03-03 08:08:49 -08:00
2009-07-27 12:10:38 -07:00
2011-07-25 20:57:10 -07:00
2008-07-27 23:00:59 +02:00
2011-11-17 18:17:59 -08:00
2011-11-17 18:17:59 -08:00
2008-07-27 23:00:59 +02:00
2011-10-07 12:08:01 -07:00
2008-07-27 23:00:59 +02:00
2009-03-18 23:51:57 -07:00
2008-07-27 23:00:59 +02:00
2012-01-03 22:55:17 -05:00
2009-01-02 19:32:59 -08:00
2008-11-02 00:15:38 -07:00
2008-07-27 23:00:59 +02:00
2012-02-26 16:48:06 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2012-01-17 16:16:56 -05:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-01-27 12:30:39 +01:00
2008-07-27 23:00:59 +02:00
2010-08-07 18:15:50 +02:00
2008-07-27 23:00:59 +02:00
2009-03-02 15:41:30 -08:00
2008-12-27 00:35:12 -08:00
2008-07-27 23:00:59 +02:00
2008-10-13 09:51:40 -07:00
2011-04-21 16:44:44 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-08-20 17:14:54 -07:00
2011-12-12 13:54:35 +00:00
2012-01-10 16:30:54 -08:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2012-02-24 01:37:35 -08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-08-15 14:35:19 -07:00
2011-08-15 14:35:18 -07:00
2009-12-14 23:55:32 +01:00
2008-07-27 23:00:59 +02:00
2011-09-16 14:21:33 -07:00
2008-07-27 23:00:59 +02:00
2008-08-31 01:40:12 -07:00
2010-03-27 08:36:18 -07:00
2008-09-06 19:30:17 +01:00
2009-12-10 23:32:10 -08:00
2009-12-10 23:32:10 -08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2009-01-06 18:10:27 -08:00
2008-07-27 23:00:59 +02:00
2010-02-17 13:07:21 +01:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-06-07 16:06:34 -07:00
2011-06-07 16:06:34 -07:00
2008-07-27 23:00:59 +02:00
2010-08-10 13:47:39 -07:00
2011-10-31 19:30:54 -04:00
2012-01-09 14:47:06 -08:00
2011-11-21 12:32:25 -08:00
2008-07-27 23:00:59 +02:00
2008-09-19 21:18:03 -07:00
2009-01-06 13:19:28 -08:00
2008-07-27 23:00:59 +02:00
2010-01-15 01:34:28 -08:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-05-25 08:39:13 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-05-25 08:39:13 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-04-12 08:46:41 +02:00
2008-07-27 23:00:59 +02:00
2009-06-16 04:56:11 -07:00
2009-01-02 21:33:05 -08:00
2011-08-05 00:53:57 -07:00
2008-07-27 23:00:59 +02:00
2008-12-04 09:17:03 -08:00
2008-07-27 23:00:59 +02:00
2012-01-03 22:55:17 -05:00
2010-08-09 00:45:46 -07:00
2010-08-09 00:45:46 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2011-11-01 00:51:30 -07:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-07-27 23:00:59 +02:00
2008-08-31 20:59:37 -07:00
2008-07-27 23:00:59 +02:00
2012-03-04 17:54:34 -05:00
2008-07-27 23:00:59 +02:00
2009-09-23 07:39:29 -07:00
2008-09-11 23:46:40 -07:00
2008-07-27 23:00:59 +02:00
2011-05-16 13:03:28 -07:00
2008-07-27 23:00:59 +02:00
2011-09-16 14:21:33 -07:00
2008-07-27 23:00:59 +02:00