On Tuesday, September 13, 2016 12:47:49 PM CEST Kevin Hilman wrote:> > Errors summary:
4 mips-linux-gnu-gcc: error: unrecognized command line option '-mcompact-branches=optimal'
There was a discussion about that earlier this year, see https://lkml.org/lkml/2016/4/22/145
I think this could be done to not get the warning unless it's explictly enabled, which was suggested in the email thread but didn't actually happen:
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index f0e314ceb8ba..a523495643ff 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug @@ -117,7 +117,10 @@ if CPU_MIPSR6
choice prompt "Compact branch policy" - default MIPS_COMPACT_BRANCHES_OPTIMAL + default MIPS_COMPACT_BRANCHES_DEFAULT + +config MIPS_COMPACT_BRANCHES_DEFAULT + bool "Default (leave it up the compiler"
config MIPS_COMPACT_BRANCHES_NEVER bool "Never (force delay slot branches)"
It should also be possible to use $(cc-option ...)
2 arch/mips/include/asm/mach-cavium-octeon/mangle-port.h:19:40: error: right shift count >= width of type [-Werror=shift-count-overflow] 1 {standard input}:191: Error: number (0x9000000080000000) larger than 32 bits 1 {standard input}:164: Error: number (0x9000000080000000) larger than 32 bits 1 {standard input}:154: Error: number (0x9000000080000000) larger than 32 bits 1 {standard input}:139: Error: number (0x9000000080000000) larger than 32 bits 1 {standard input}:131: Error: number (0x9000000080000000) larger than 32 bits 1 drivers/clk/clk-ls1x.c:148:29: error: 'BYPASS_DDR_WIDTH' undeclared (first use in this function) 1 drivers/clk/clk-ls1x.c:148:11: error: 'BYPASS_DDR_SHIFT' undeclared (first use in this function) 1 drivers/clk/clk-ls1x.c:131:28: error: 'BYPASS_DC_WIDTH' undeclared (first use in this function) 1 drivers/clk/clk-ls1x.c:131:11: error: 'BYPASS_DC_SHIFT' undeclared (first use in this function) 1 drivers/clk/clk-ls1x.c:115:29: error: 'BYPASS_CPU_WIDTH' undeclared (first use in this function) 1 drivers/clk/clk-ls1x.c:115:11: error: 'BYPASS_CPU_SHIFT' undeclared (first use in this function)
These errors should all have an obvious fix.
Warnings summary:
384 <stdin>:1322:2: warning: #warning syscall pkey_free not implemented [-Wcpp] 384 <stdin>:1319:2: warning: #warning syscall pkey_alloc not implemented [-Wcpp] 384 <stdin>:1316:2: warning: #warning syscall pkey_mprotect not implemented [-Wcpp]
All architectures currently get this, need to think about how to best handle them, either add the syscall numbers for all architectures, or mark them as ignored.
8 crypto/wp512.c:987:1: warning: the frame size of 1104 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 crypto/wp512.c:987:1: warning: the frame size of 1568 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 crypto/wp512.c:987:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 crypto/wp512.c:987:1: warning: the frame size of 1264 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 crypto/wp512.c:987:1: warning: the frame size of 1128 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 crypto/serpent_generic.c:436:1: warning: the frame size of 1472 bytes is larger than 1024 bytes [-Wframe-larger-than=] 1 crypto/serpent_generic.c:436:1: warning: the frame size of 1456 bytes is larger than 1024 bytes [-Wframe-larger-than=]
This keeps coming up on all architectures, depending on how you look at it, it might be a compiler bug, or it's impossible to turn the code into an efficient binary output. The problem is probably that we run out of registers in an unrolled loop.
See if there are any unusual gcc options involved in case it only happens with some configurations.
On ARM, I found that GCOV_PROFILE_ALL caused the warning, but that's now disabled in allmodconfig/allyesconfig.
4 WARNING: modpost: missing MODULE_LICENSE() in drivers/gpio/gpio-aspeed.o
I get this on ARM as well, I think someone sent a patch already.
1 drivers/net/ethernet/ti/cpmac.c:1213:2: warning: #warning FIXME: unhardcode gpio&reset bits [-Wcpp]
In other cases like this, I've turned unconditional #warning into a runtime pr_warn() for the driver, as there is little value in the output for every user: if nobody has bothered fixing it since 2007, it's unlikely that the next person who sees the warning will.
1 drivers/mtd/maps/pmcmsp-flash.c:149:30: warning: passing argument 1 of 'strncpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
I sent a patch for this one to the mtd maintainer.
1 arch/mips/ralink/timer.c:74:13: warning: 'rt_timer_free' defined but not used [-Wunused-function] 1 arch/mips/ralink/timer.c:104:13: warning: 'rt_timer_disable' defined but not used [-Wunused-function] 1 arch/mips/ralink/rt305x.c:92:13: warning: 'rt305x_wdt_reset' defined but not used [-Wunused-function]
gcc is right, these are never called from anywhere. Remove them? It's always easy to rever the patch if we want them back.
1 arch/mips/ralink/prom.c:70:2: warning: 'argv' is used uninitialized in this function [-Wuninitialized] 1 arch/mips/ralink/prom.c:70:2: warning: 'argc' is used uninitialized in this function [-Wuninitialized]
trivial to fix, remove the local variables.
1 arch/mips/netlogic/common/smpboot.S:63: Warning: dla used to load 32-bit register; recommend using la instead 1 arch/mips/netlogic/common/smpboot.S:62: Warning: dla used to load 32-bit register; recommend using la instead 1 arch/mips/dec/int-handler.S:198: Warning: macro instruction expanded into multiple instructions in a branch delay slot 1 arch/mips/dec/int-handler.S:149: Warning: macro instruction expanded into multiple instructions in a branch delay slot
No idea, but probably obvious when you know MIPS assembly.
1 arch/mips/configs/lemote2f_defconfig:42:warning: symbol value 'm' invalid for CPU_FREQ_STAT 1 arch/mips/configs/ip27_defconfig:136:warning: symbol value 'm' invalid for SCSI_DH
trivial: turn them into "=y"
Arnd