# git rev-parse -q --verify e2079e93f562c7f7a030eb7642017ee5eabaaa10^{commit} e2079e93f562c7f7a030eb7642017ee5eabaaa10 already have revision, skipping fetch # git checkout -q -f -B kisskb e2079e93f562c7f7a030eb7642017ee5eabaaa10 # git clean -qxdf # < git log -1 # commit e2079e93f562c7f7a030eb7642017ee5eabaaa10 # Author: Nathan Chancellor # Date: Mon Aug 26 17:41:55 2019 -0700 # # kbuild: Do not enable -Wimplicit-fallthrough for clang for now # # This functionally reverts commit bfd77145f35c ("Makefile: Convert # -Wimplicit-fallthrough=3 to just -Wimplicit-fallthrough for clang"). # # clang enabled support for -Wimplicit-fallthrough in C in r369414 [1], # which causes a lot of warnings when building the kernel for two reasons: # # 1. Clang does not support the /* fall through */ comments. There seems # to be a general consensus in the LLVM community that this is not # something they want to support. Joe Perches wrote a script to convert # all of the comments to a "fallthrough" keyword that will be added to # compiler_attributes.h [2] [3], which catches the vast majority of the # comments. There doesn't appear to be any consensus in the kernel # community when to do this conversion. # # 2. Clang and GCC disagree about falling through to final case statements # with no content or cases that simply break: # # https://godbolt.org/z/c8csDu # # This difference contributes at least 50 warnings in an allyesconfig # build for x86, not considering other architectures. This difference # will need to be discussed to see which compiler is right [4] [5]. # # [1]: https://github.com/llvm/llvm-project/commit/1e0affb6e564b7361b0aadb38805f26deff4ecfc # [2]: https://lore.kernel.org/lkml/61ddbb86d5e68a15e24ccb06d9b399bbf5ce2da7.camel@perches.com/ # [3]: https://lore.kernel.org/lkml/1d2830aadbe9d8151728a7df5b88528fc72a0095.1564549413.git.joe@perches.com/ # [4]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432 # [5]: https://github.com/ClangBuiltLinux/linux/issues/636 # # Given these two problems need discussion and coordination, do not enable # -Wimplicit-fallthrough with clang right now. Add a comment to explain # what is going on as well. This commit should be reverted once these two # issues are fully flushed out and resolved. # # Suggested-by: Masahiro Yamada # Signed-off-by: Nathan Chancellor # Acked-by: Miguel Ojeda # Acked-by: Nick Desaulniers # Acked-by: Gustavo A. R. Silva # Signed-off-by: Masahiro Yamada # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc --version # < /opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-ld --version # < git log --format=%s --max-count=1 e2079e93f562c7f7a030eb7642017ee5eabaaa10 # < make -s -j 120 ARCH=sh O=/kisskb/build/kbuild_sh-defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- defconfig # make -s -j 120 ARCH=sh O=/kisskb/build/kbuild_sh-defconfig_sh4 CROSS_COMPILE=/opt/cross/kisskb/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux- Generating include/generated/machtypes.h :1511:2: warning: #warning syscall clone3 not implemented [-Wcpp] /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S: Assembler messages: /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:385: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/arch/sh/kernel/cpu/sh4/../sh3/../../entry-common.S:388: Warning: overflow in branch to syscall_exit_work; converted into longer instruction sequence /kisskb/src/kernel/rcu/srcutree.c: In function 'init_srcu_struct_fields': /kisskb/src/kernel/rcu/srcutree.c:140:32: warning: 'levelspread[]' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/kernel/rcu/srcutree.c:88:6: note: 'levelspread[]' was declared here /kisskb/src/fs/proc/inode.c: In function 'proc_reg_open': /kisskb/src/include/linux/list.h:65:12: warning: 'pdeo' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/proc/inode.c:338:21: note: 'pdeo' was declared here /kisskb/src/kernel/printk/printk.c: In function 'devkmsg_sysctl_set_loglvl': /kisskb/src/kernel/printk/printk.c:194:16: warning: 'old' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function 'regmap_raw_read': /kisskb/src/drivers/base/regmap/regmap.c:2591:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/base/regmap/regmap.c: In function '_regmap_raw_write': /kisskb/src/drivers/base/regmap/regmap.c:1852:6: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/drivers/sh/clk/cpg.c: In function 'r8': /kisskb/src/drivers/sh/clk/cpg.c:41:2: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:29:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r16': /kisskb/src/drivers/sh/clk/cpg.c:46:2: warning: passing argument 1 of 'ioread16' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:30:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/drivers/sh/clk/cpg.c: In function 'r32': /kisskb/src/drivers/sh/clk/cpg.c:51:2: warning: passing argument 1 of 'ioread32' discards 'const' qualifier from pointer target type [enabled by default] /kisskb/src/include/asm-generic/iomap.h:32:21: note: expected 'void *' but argument is of type 'const void *' /kisskb/src/mm/vmstat.c: In function 'sysctl_vm_numa_stat_handler': /kisskb/src/mm/vmstat.c:90:5: warning: 'oldval' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/fs/ext4/readpage.c: In function 'ext4_mpage_readpages': /kisskb/src/fs/ext4/readpage.c:295:1: warning: the frame size of 1200 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/fs/mpage.c: In function 'do_mpage_readpage': /kisskb/src/fs/mpage.c:338:1: warning: the frame size of 1108 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/fs/mpage.c: In function '__mpage_writepage': /kisskb/src/fs/mpage.c:690:1: warning: the frame size of 1148 bytes is larger than 1024 bytes [-Wframe-larger-than=] /kisskb/src/drivers/usb/core/devio.c: In function 'async_completed': /kisskb/src/drivers/usb/core/devio.c:613:23: warning: 'errno' may be used uninitialized in this function [-Wuninitialized] /kisskb/src/mm/hugetlb.c: In function 'alloc_pool_huge_page': /kisskb/src/mm/hugetlb.c:1465:5: warning: 'page' may be used uninitialized in this function [-Wuninitialized] WARNING: "ftrace_set_clr_event" [vmlinux] is a static EXPORT_SYMBOL_GPL WARNING: "ftrace_set_clr_event" [vmlinux] is a static EXPORT_SYMBOL_GPL Kernel: arch/sh/boot/zImage is ready Completed OK # rm -rf /kisskb/build/kbuild_sh-defconfig_sh4 # Build took: 0:00:26.997061