# git rev-parse -q --verify 23c35f48f5fbe33f68904138b23fee64df7d2f0f^{commit} 23c35f48f5fbe33f68904138b23fee64df7d2f0f already have revision, skipping fetch # git checkout -q -f -B kisskb 23c35f48f5fbe33f68904138b23fee64df7d2f0f # git clean -qxdf # git log -1 commit 23c35f48f5fbe33f68904138b23fee64df7d2f0f Author: Linus Torvalds Date: Fri Feb 2 16:44:14 2018 -0800 pinctrl: remove include file from When pulling the recent pinctrl merge, I was surprised by how a pinctrl-only pull request ended up rebuilding basically the whole kernel. The reason for that ended up being that included , so any change to that file ended up causing pretty much every driver out there to be rebuilt. The reason for that was because 'struct device' has this in it: #ifdef CONFIG_PINCTRL struct dev_pin_info *pins; #endif but we already avoid header includes for these kinds of things in that header file, preferring to just use a forward-declaration of the structure instead. Exactly to avoid this kind of header dependency. Since some drivers seem to expect that header to come in automatically, move the include to instead. It might be better to just make the includes more targeted, but I'm not going to review every driver. It would definitely be good to have a tool for finding and minimizing header dependencies automatically - or at least help with them. Right now we almost certainly end up having way too many of these things, and it's hard to test every single configuration. FWIW, you can get a sense of the "hotness" of a header file with something like this after doing a full build: find . -name '.*.o.cmd' -print0 | xargs -0 tail --lines=+2 | grep -v 'wildcard ' | tr ' \\' '\n' | sort | uniq -c | sort -n | less -S which isn't exact (there are other things in those '*.o.cmd' than just the dependencies, and the "--lines=+2" only removes the header), but might a useful approximation. With this patch, drops to "only" having 833 users in the current x86-64 allmodconfig. In contrast, has 14857 build files including it directly or indirectly. Of course, the headers that absolutely _everybody_ includes (things like etc) get a score of 23000+. Cc: Linus Walleij Cc: Greg Kroah-Hartman Signed-off-by: Linus Torvalds # < /opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux-gcc --version # < git log --format=%s --max-count=1 23c35f48f5fbe33f68904138b23fee64df7d2f0f # < make -j 120 ARCH=i386 O=/home/kisskb/slave/build/linus_i386-randconfig_i386 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux- randconfig KCONFIG_SEED=0x85B1FD3E # Added to kconfig CONFIG_STANDALONE=y # Added to kconfig CONFIG_PREVENT_FIRMWARE_BUILD=y # yes \n | make -j 120 ARCH=i386 O=/home/kisskb/slave/build/linus_i386-randconfig_i386 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux- oldconfig yes: standard output: Broken pipe yes: write error # make -j 120 ARCH=i386 O=/home/kisskb/slave/build/linus_i386-randconfig_i386 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux- make[1]: Entering directory '/home/kisskb/slave/build/linus_i386-randconfig_i386' GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig SYSTBL arch/x86/include/generated/asm/syscalls_32.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h CHK include/config/kernel.release Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector available but compiler is broken /home/kisskb/slave/src/Makefile:1102: recipe for target 'prepare-compiler-check' failed make[1]: *** [prepare-compiler-check] Error 1 make[1]: *** Waiting for unfinished jobs.... UPD include/config/kernel.release make[1]: *** wait: No child processes. Stop. Makefile:146: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 Command 'make -j 120 ARCH=i386 O=/home/kisskb/slave/build/linus_i386-randconfig_i386 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/i386-linux/bin/i386-linux- ' returned non-zero exit status 2 # rm -rf /home/kisskb/slave/build/linus_i386-randconfig_i386 # Build took: 0:00:06.770844