diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-24 10:08:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-24 10:08:39 -0700 |
commit | ed2d265d1266736bd294332d7f649003943ae36e (patch) | |
tree | 860e5b7bb72933e4a9abacdc2f2d75a0e6254e32 /drivers/gpu | |
parent | f1d38e423a697b7aa06e12d3ca4753bcc1aa3531 (diff) | |
parent | 6c03438edeb5c359af35f060ea016ca65671c269 (diff) | |
download | linux-stable-ed2d265d1266736bd294332d7f649003943ae36e.tar.gz linux-stable-ed2d265d1266736bd294332d7f649003943ae36e.tar.bz2 linux-stable-ed2d265d1266736bd294332d7f649003943ae36e.zip |
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.
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/cayman_blit_shaders.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_blit_shaders.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_blit_shaders.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/si_blit_shaders.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/cayman_blit_shaders.c b/drivers/gpu/drm/radeon/cayman_blit_shaders.c index 7b4eeb7b4a8c..19a0114d2e3b 100644 --- a/drivers/gpu/drm/radeon/cayman_blit_shaders.c +++ b/drivers/gpu/drm/radeon/cayman_blit_shaders.c @@ -24,6 +24,7 @@ * Alex Deucher <alexander.deucher@amd.com> */ +#include <linux/bug.h> #include <linux/types.h> #include <linux/kernel.h> diff --git a/drivers/gpu/drm/radeon/evergreen_blit_shaders.c b/drivers/gpu/drm/radeon/evergreen_blit_shaders.c index 3a10399e0066..f85c0af115b5 100644 --- a/drivers/gpu/drm/radeon/evergreen_blit_shaders.c +++ b/drivers/gpu/drm/radeon/evergreen_blit_shaders.c @@ -24,6 +24,7 @@ * Alex Deucher <alexander.deucher@amd.com> */ +#include <linux/bug.h> #include <linux/types.h> #include <linux/kernel.h> diff --git a/drivers/gpu/drm/radeon/r600_blit_shaders.c b/drivers/gpu/drm/radeon/r600_blit_shaders.c index 73e2c7c6edbc..34c8b2340f33 100644 --- a/drivers/gpu/drm/radeon/r600_blit_shaders.c +++ b/drivers/gpu/drm/radeon/r600_blit_shaders.c @@ -24,6 +24,7 @@ * Alex Deucher <alexander.deucher@amd.com> */ +#include <linux/bug.h> #include <linux/types.h> #include <linux/kernel.h> diff --git a/drivers/gpu/drm/radeon/si_blit_shaders.c b/drivers/gpu/drm/radeon/si_blit_shaders.c index a7124b483adf..ec415e7dfa4b 100644 --- a/drivers/gpu/drm/radeon/si_blit_shaders.c +++ b/drivers/gpu/drm/radeon/si_blit_shaders.c @@ -25,6 +25,7 @@ */ #include <linux/types.h> +#include <linux/bug.h> #include <linux/kernel.h> const u32 si_default_state[] = |