mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-30 06:25:03 +08:00
ed2d265d12
"[RFC - PATCH 0/7] consolidation of BUG support code." https://lkml.org/lkml/2012/1/26/525 -- 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJPbNwpAAoJEOvOhAQsB9HWrqYP/A0t9VB0nK6e42F0OR2P14MZ GJFtf1B++wwioIrx+KSWSRfSur1C5FKhDbxLR3I/pvkAYl4+T4JvRdMG6xJwxyip CC1kVQQNDjWVVqzjz2x6rYkOffx6dUlw/ERyIyk+OzP+1HzRIsIrugMqbzGLlX0X y0v2Tbd0G6xg1DV8lcRdp95eIzcGuUvdb2iY2LGadWZczEOeSXx64Jz3QCFxg3aL LFU4oovsg8Nb7MRJmqDvHK/oQf5vaTm9WSrS0pvVte0msSQRn8LStYdWC0G9BPCS GwL86h/eLXlUXQlC5GpgWg1QQt5i2QpjBFcVBIG0IT5SgEPMx+gXyiqZva2KwbHu LKicjKtfnzPitQnyEV/N6JyV1fb1U6/MsB7ebU5nCCzt9Gr7MYbjZ44peNeprAtu HMvJ/BNnRr4Ha6nPQNu952AdASPKkxmeXFUwBL1zUbLkOX/bK/vy1ujlcdkFxCD7 fP3t7hghYa737IHk0ehUOhrE4H67hvxTSCKioLUAy/YeN1IcfH/iOQiCBQVLWmoS AqYV6ou9cqgdYoyila2UeAqegb+8xyubPIHt+lebcaKxs5aGsTg+r3vq5juMDAPs iwSVYUDcIw9dHer1lJfo7QCy3QUTRDTxh+LB9VlHXQICgeCK02sLBOi9hbEr4/H8 Ko9g8J3BMxcMkXLHT9ud =PYQT -----END PGP SIGNATURE----- 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. |
||
---|---|---|
.. | ||
reg_srcs | ||
.gitignore | ||
atom-bits.h | ||
atom-names.h | ||
atom-types.h | ||
atom.c | ||
atom.h | ||
atombios_crtc.c | ||
atombios_dp.c | ||
atombios_encoders.c | ||
atombios_i2c.c | ||
atombios.h | ||
avivod.h | ||
cayman_blit_shaders.c | ||
cayman_blit_shaders.h | ||
evergreen_blit_kms.c | ||
evergreen_blit_shaders.c | ||
evergreen_blit_shaders.h | ||
evergreen_cs.c | ||
evergreen_reg.h | ||
evergreen.c | ||
evergreend.h | ||
Kconfig | ||
Makefile | ||
mkregtable.c | ||
ni_reg.h | ||
ni.c | ||
nid.h | ||
ObjectID.h | ||
r100_track.h | ||
r100.c | ||
r100d.h | ||
r200.c | ||
r300_cmdbuf.c | ||
r300_reg.h | ||
r300.c | ||
r300d.h | ||
r420.c | ||
r420d.h | ||
r500_reg.h | ||
r520.c | ||
r520d.h | ||
r600_audio.c | ||
r600_blit_kms.c | ||
r600_blit_shaders.c | ||
r600_blit_shaders.h | ||
r600_blit.c | ||
r600_cp.c | ||
r600_cs.c | ||
r600_hdmi.c | ||
r600_reg.h | ||
r600.c | ||
r600d.h | ||
radeon_acpi.c | ||
radeon_agp.c | ||
radeon_asic.c | ||
radeon_asic.h | ||
radeon_atombios.c | ||
radeon_atpx_handler.c | ||
radeon_benchmark.c | ||
radeon_bios.c | ||
radeon_blit_common.h | ||
radeon_clocks.c | ||
radeon_combios.c | ||
radeon_connectors.c | ||
radeon_cp.c | ||
radeon_cs.c | ||
radeon_cursor.c | ||
radeon_device.c | ||
radeon_display.c | ||
radeon_drv.c | ||
radeon_drv.h | ||
radeon_encoders.c | ||
radeon_family.h | ||
radeon_fb.c | ||
radeon_fence.c | ||
radeon_gart.c | ||
radeon_gem.c | ||
radeon_i2c.c | ||
radeon_ioc32.c | ||
radeon_irq_kms.c | ||
radeon_irq.c | ||
radeon_kms.c | ||
radeon_legacy_crtc.c | ||
radeon_legacy_encoders.c | ||
radeon_legacy_tv.c | ||
radeon_mem.c | ||
radeon_mode.h | ||
radeon_object.c | ||
radeon_object.h | ||
radeon_pm.c | ||
radeon_reg.h | ||
radeon_ring.c | ||
radeon_sa.c | ||
radeon_semaphore.c | ||
radeon_state.c | ||
radeon_test.c | ||
radeon_trace_points.c | ||
radeon_trace.h | ||
radeon_ttm.c | ||
radeon.h | ||
rs100d.h | ||
rs400.c | ||
rs400d.h | ||
rs600.c | ||
rs600d.h | ||
rs690.c | ||
rs690d.h | ||
rv200d.h | ||
rv250d.h | ||
rv350d.h | ||
rv515.c | ||
rv515d.h | ||
rv770.c | ||
rv770d.h | ||
si_blit_shaders.c | ||
si_blit_shaders.h | ||
si_reg.h | ||
si.c | ||
sid.h |