Skip to contentSkip to conversation

sh: Drop -Werror from kernel Makefile

PATCH In review Guenter Roeck 5 participants 13 messages Aug 5, 2019 – Aug 15, 2019 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: Drop -Werror from kernel Makefile

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Cc Gustavo A. R. Silva <[email protected]>
---
 arch/sh/kernel/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Quoted 6 lines

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Cc Gustavo A. R. Silva <[email protected]>
Quoted 16 lines
---
 arch/sh/kernel/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4
#2 lore raw
Quoted 7 lines · Rich Felker
Quoted 6 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Quoted 9 lines
Quoted 6 lines

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Cc Gustavo A. R. Silva <[email protected]>

Any chance to get this or a similar patch applied soon ? All sh builds in mainline and -next are still broken.

Thanks,
Guenter

Quoted 16 lines
Quoted 16 lines
---
 arch/sh/kernel/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4
#3 lore raw

Hi Guenter,

Quoted 12 lines · Guenter Roeck
Quoted 11 lines · Rich Felker
Quoted 10 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Cc Gustavo A. R. Silva <[email protected]>

Any chance to get this or a similar patch applied soon ? All sh builds in mainline and -next are still broken.

If no one cares, I can add it to my tree and include it in my pull-request for 5.3-rc4.

I would just need your Tested-by.

Thanks
--
Gustavo

Quoted 19 lines

Thanks,
Guenter

Quoted 16 lines
Quoted 16 lines
---
 arch/sh/kernel/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4
author Tested-by
#4 lore raw
Quoted 20 lines · Gustavo A. R. Silva

Hi Guenter,

Quoted 17 lines · Guenter Roeck
Quoted 16 lines · Rich Felker
Quoted 6 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Quoted 6 lines

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Cc Gustavo A. R. Silva <[email protected]>
Quoted 9 lines
Quoted 3 lines

Any chance to get this or a similar patch applied soon ? All sh builds in mainline and -next are still broken.

If no one cares, I can add it to my tree and include it in my pull-request for 5.3-rc4.

I would just need your Tested-by.

Sure:

[ Applied to ToT and built sh:{defconfig,allnoconfig,tinyconfig} ]

Thanks,
Guenter

Quoted 23 lines

Thanks
--
Gustavo

Quoted 19 lines

Thanks,
Guenter

Quoted 16 lines
Quoted 16 lines
---
 arch/sh/kernel/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4
#5 lore raw

Guenter,

Quoted 28 lines · Guenter Roeck
Quoted 27 lines · Gustavo A. R. Silva

Hi Guenter,

Quoted 12 lines · Guenter Roeck
Quoted 11 lines · Rich Felker
Quoted 10 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Cc Gustavo A. R. Silva <[email protected]>

Any chance to get this or a similar patch applied soon ? All sh builds in mainline and -next are still broken.

If no one cares, I can add it to my tree and include it in my pull-request for 5.3-rc4.

Quoted 9 lines
Quoted 2 lines

I would just need your Tested-by.

Sure:

[ Applied to ToT and built sh:{defconfig,allnoconfig,tinyconfig} ]

On second thought it seems to me that this is not a good idea, at least for mainline. For the time being I'll take this patch for linux-next only.

Who is the maintainer of sh?

The best solution is to fix those fall-through warnings you see. Could you please send me all the warnings you see? I can try to fix them.

Thanks!
--
Gustavo

#6 lore raw
Quoted 8 lines · Gustavo A. R. Silva
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Gustavo A. R. Silva
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Rich Felker
Quoted 3 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

[]

Quoted 4 lines

On second thought it seems to me that this is not a good idea, at least for mainline. For the time being I'll take this patch for linux-next only.

Who is the maintainer of sh?

But whoever it may be, isn't particularly active.

MAINTAINERS-SUPERH

MAINTAINERS-M:  Yoshinori Sato <[email protected]>
MAINTAINERS-M:  Rich Felker <[email protected]>
MAINTAINERS-L:  [email protected]
MAINTAINERS-Q:  http://patchwork.kernel.org/project/linux-sh/list/
MAINTAINERS-S:  Maintained
MAINTAINERS-F:  Documentation/sh/

MAINTAINERS:F: arch/sh/
MAINTAINERS-F: drivers/sh/

Quoted 2 lines

The best solution is to fix those fall-through warnings you see. Could you please send me all the warnings you see? I can try to fix them.

It's true it's a warning, but adding -Werror is rarely a good idea as gcc error output can change with every version.

#7 lore raw
Quoted 33 lines · Joe Perches
Quoted 8 lines · Gustavo A. R. Silva
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Gustavo A. R. Silva
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Rich Felker
Quoted 3 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

[]

Quoted 4 lines

On second thought it seems to me that this is not a good idea, at least for mainline. For the time being I'll take this patch for linux-next only.

Who is the maintainer of sh?

But whoever it may be, isn't particularly active.

MAINTAINERS-SUPERH

MAINTAINERS-M:  Yoshinori Sato <[email protected]>
MAINTAINERS-M:  Rich Felker <[email protected]>
MAINTAINERS-L:  [email protected]
MAINTAINERS-Q:  http://patchwork.kernel.org/project/linux-sh/list/
MAINTAINERS-S:  Maintained
MAINTAINERS-F:  Documentation/sh/

MAINTAINERS:F: arch/sh/
MAINTAINERS-F: drivers/sh/

Quoted 7 lines
Quoted 2 lines

The best solution is to fix those fall-through warnings you see. Could you please send me all the warnings you see? I can try to fix them.

It's true it's a warning, but adding -Werror is rarely a good idea as gcc error output can change with every version.

In the meantime I'll install sh4 and fix those warnings.

--
Gustavo

#8 lore raw
Quoted 39 lines · Gustavo A. R. Silva
Quoted 36 lines · Joe Perches
Quoted 8 lines · Gustavo A. R. Silva
Quoted 7 lines · Guenter Roeck
Quoted 6 lines · Gustavo A. R. Silva
Quoted 5 lines · Guenter Roeck
Quoted 4 lines · Rich Felker
Quoted 3 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

[]

Quoted 4 lines

On second thought it seems to me that this is not a good idea, at least for mainline. For the time being I'll take this patch for linux-next only.

Who is the maintainer of sh?

But whoever it may be, isn't particularly active.

MAINTAINERS-SUPERH

MAINTAINERS-M:  Yoshinori Sato <[email protected]>
MAINTAINERS-M:  Rich Felker <[email protected]>
MAINTAINERS-L:  [email protected]
MAINTAINERS-Q:  http://patchwork.kernel.org/project/linux-sh/list/
MAINTAINERS-S:  Maintained
MAINTAINERS-F:  Documentation/sh/

MAINTAINERS:F: arch/sh/
MAINTAINERS-F: drivers/sh/

Quoted 2 lines

The best solution is to fix those fall-through warnings you see. Could you please send me all the warnings you see? I can try to fix them.

Quoted 7 lines
Quoted 4 lines

It's true it's a warning, but adding -Werror is rarely a good idea as gcc error output can change with every version.

In the meantime I'll install sh4 and fix those warnings.

Well, I think it has paid off. It seems there is an ancient bug right there:

arch/sh/kernel/hw_breakpoint.c +1 -0
index 3bd010b4c55f..f10d64311127 100644
@@ -157,6 +157,7 @@ int arch_bp_generic_fields(int sh_len, int sh_type,
        switch (sh_type) {
        case SH_BREAKPOINT_READ:
                *gen_type = HW_BREAKPOINT_R;
+               break;
        case SH_BREAKPOINT_WRITE:
                *gen_type = HW_BREAKPOINT_W;
                break;

--
Gustavo

maintainer
#9 lore raw
In reply to Guenter Roeck
Quoted 30 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Cc Gustavo A. R. Silva <[email protected]>
---
 arch/sh/kernel/Makefile | 2 --
 1 file changed, 2 deletions(-)
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
 obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4

Applied sh-next.
Sorry too late replay.

Signature · 1 line
Yosinori Sato
#10 lore raw
Quoted 19 lines · Yoshinori Sato
Quoted 17 lines · Guenter Roeck

Since commit a035d552a93b ("Makefile: Globally enable fall-through warning"), all sh builds fail with errors such as

arch/sh/kernel/disassemble.c: In function 'print_sh_insn':
arch/sh/kernel/disassemble.c:478:8: error: this statement may fall through

Since this effectively disables all build and boot tests for the architecture, let's drop -Werror from the sh kernel Makefile until the problems are fixed.

Cc Gustavo A. R. Silva <[email protected]>
---
  arch/sh/kernel/Makefile | 2 --
  1 file changed, 2 deletions(-)
Quoted 17 lines
Quoted 13 lines
arch/sh/kernel/Makefile +0 -2
index 59673f8a3379..ef65f0625c6c 100644
@@ -47,5 +47,3 @@ obj-$(CONFIG_DWARF_UNWINDER)	+= dwarf.o
  obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_callchain.o
  obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-coherent.o
  obj-$(CONFIG_HAVE_HW_BREAKPOINT)		+= hw_breakpoint.o
-
-ccflags-y := -Werror
Signature · 1 line
2.7.4

Applied sh-next.
Sorry too late replay.

Please note that _mainline_ builds are currently broken.

Guenter