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. |
||
---|---|---|
.. | ||
include/mach | ||
clock-imx1.c | ||
clock-imx6q.c | ||
clock-imx21.c | ||
clock-imx25.c | ||
clock-imx27.c | ||
clock-imx31.c | ||
clock-imx35.c | ||
clock-mx51-mx53.c | ||
cpu-imx5.c | ||
cpu-imx25.c | ||
cpu-imx27.c | ||
cpu-imx31.c | ||
cpu-imx35.c | ||
cpu_op-mx51.c | ||
cpu_op-mx51.h | ||
crm-regs-imx5.h | ||
crmregs-imx31.h | ||
devices-imx1.h | ||
devices-imx21.h | ||
devices-imx25.h | ||
devices-imx27.h | ||
devices-imx31.h | ||
devices-imx35.h | ||
devices-imx50.h | ||
devices-imx51.h | ||
devices-imx53.h | ||
dma-v1.c | ||
efika.h | ||
ehci-imx5.c | ||
ehci-imx25.c | ||
ehci-imx27.c | ||
ehci-imx31.c | ||
ehci-imx35.c | ||
eukrea_mbimx27-baseboard.c | ||
eukrea_mbimx51-baseboard.c | ||
eukrea_mbimxsd-baseboard.c | ||
eukrea_mbimxsd25-baseboard.c | ||
eukrea_mbimxsd35-baseboard.c | ||
gpc.c | ||
head-v7.S | ||
hotplug.c | ||
imx51-dt.c | ||
imx53-dt.c | ||
iomux-imx31.c | ||
Kconfig | ||
lluart.c | ||
localtimer.c | ||
mach-apf9328.c | ||
mach-armadillo5x0.c | ||
mach-bug.c | ||
mach-cpuimx27.c | ||
mach-cpuimx35.c | ||
mach-cpuimx51.c | ||
mach-cpuimx51sd.c | ||
mach-eukrea_cpuimx25.c | ||
mach-imx6q.c | ||
mach-imx27_visstrim_m10.c | ||
mach-imx27ipcam.c | ||
mach-imx27lite.c | ||
mach-kzm_arm11_01.c | ||
mach-mx1ads.c | ||
mach-mx21ads.c | ||
mach-mx25_3ds.c | ||
mach-mx27_3ds.c | ||
mach-mx27ads.c | ||
mach-mx31_3ds.c | ||
mach-mx31ads.c | ||
mach-mx31lilly.c | ||
mach-mx31lite.c | ||
mach-mx31moboard.c | ||
mach-mx35_3ds.c | ||
mach-mx50_rdp.c | ||
mach-mx51_3ds.c | ||
mach-mx51_babbage.c | ||
mach-mx51_efikamx.c | ||
mach-mx51_efikasb.c | ||
mach-mx53_ard.c | ||
mach-mx53_evk.c | ||
mach-mx53_loco.c | ||
mach-mx53_smd.c | ||
mach-mxt_td60.c | ||
mach-pca100.c | ||
mach-pcm037.c | ||
mach-pcm037_eet.c | ||
mach-pcm038.c | ||
mach-pcm043.c | ||
mach-qong.c | ||
mach-scb9328.c | ||
mach-vpr200.c | ||
Makefile | ||
Makefile.boot | ||
mm-imx1.c | ||
mm-imx3.c | ||
mm-imx5.c | ||
mm-imx21.c | ||
mm-imx25.c | ||
mm-imx27.c | ||
mmdc.c | ||
mx1-camera-fiq-ksym.c | ||
mx1-camera-fiq.S | ||
mx31lilly-db.c | ||
mx31lite-db.c | ||
mx31moboard-devboard.c | ||
mx31moboard-marxbot.c | ||
mx31moboard-smartbot.c | ||
mx51_efika.c | ||
pcm037.h | ||
pcm970-baseboard.c | ||
platsmp.c | ||
pm-imx5.c | ||
pm-imx6q.c | ||
pm-imx27.c | ||
src.c |