* [PATCH 1/2] CRISv32: add unreachable() to BUG()
@ 2015-05-14 12:36 Rabin Vincent
2015-05-14 12:36 ` [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE Rabin Vincent
2015-05-17 19:09 ` [PATCH 1/2] CRISv32: add unreachable() to BUG() Jesper Nilsson
0 siblings, 2 replies; 4+ messages in thread
From: Rabin Vincent @ 2015-05-14 12:36 UTC (permalink / raw)
To: jesper.nilsson; +Cc: linux-kernel, linux-cris-kernel, Rabin Vincent
Add an unreachable() in the BUG() implementations, to get rid of
several warnings similar to the one below:
kernel/sched/core.c: In function 'pick_next_task':
kernel/sched/core.c:2690:1: warning: control reaches end of non-void function [-Wreturn-type]
Signed-off-by: Rabin Vincent <rabin@rab.in>
---
arch/cris/include/arch-v32/arch/bug.h | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/cris/include/arch-v32/arch/bug.h b/arch/cris/include/arch-v32/arch/bug.h
index 0f211e1..fb59faa 100644
--- a/arch/cris/include/arch-v32/arch/bug.h
+++ b/arch/cris/include/arch-v32/arch/bug.h
@@ -10,6 +10,7 @@
* All other stuff is done out-of-band with exception handlers.
*/
#define BUG() \
+do { \
__asm__ __volatile__ ("0: break 14\n\t" \
".section .fixup,\"ax\"\n" \
"1:\n\t" \
@@ -21,9 +22,15 @@
".section __ex_table,\"a\"\n\t" \
".dword 0b, 1b\n\t" \
".previous\n\t" \
- : : "ri" (__FILE__), "i" (__LINE__))
+ : : "ri" (__FILE__), "i" (__LINE__)); \
+ unreachable(); \
+} while (0)
#else
-#define BUG() __asm__ __volatile__ ("break 14\n\t")
+#define BUG() \
+do { \
+ __asm__ __volatile__ ("break 14\n\t"); \
+ unreachable(); \
+} while (0)
#endif
#define HAVE_ARCH_BUG
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE
2015-05-14 12:36 [PATCH 1/2] CRISv32: add unreachable() to BUG() Rabin Vincent
@ 2015-05-14 12:36 ` Rabin Vincent
2015-05-17 19:15 ` Jesper Nilsson
2015-05-17 19:09 ` [PATCH 1/2] CRISv32: add unreachable() to BUG() Jesper Nilsson
1 sibling, 1 reply; 4+ messages in thread
From: Rabin Vincent @ 2015-05-14 12:36 UTC (permalink / raw)
To: jesper.nilsson; +Cc: linux-kernel, linux-cris-kernel, Rabin Vincent
Support for verbose BUG reporting already exists, but the HAVE flag that
allows the option to be enabled is missing.
Signed-off-by: Rabin Vincent <rabin@rab.in>
---
arch/cris/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 0314e32..b202b82 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -58,6 +58,7 @@ config CRIS
select CLKSRC_MMIO if ETRAX_ARCH_V32
select GENERIC_CLOCKEVENTS if ETRAX_ARCH_V32
select GENERIC_SCHED_CLOCK if ETRAX_ARCH_V32
+ select HAVE_DEBUG_BUGVERBOSE if ETRAX_ARCH_V32
config HZ
int
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] CRISv32: add unreachable() to BUG()
2015-05-14 12:36 [PATCH 1/2] CRISv32: add unreachable() to BUG() Rabin Vincent
2015-05-14 12:36 ` [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE Rabin Vincent
@ 2015-05-17 19:09 ` Jesper Nilsson
1 sibling, 0 replies; 4+ messages in thread
From: Jesper Nilsson @ 2015-05-17 19:09 UTC (permalink / raw)
To: Rabin Vincent
Cc: Jesper Nilsson, linux-kernel@vger.kernel.org, linux-cris-kernel
On Thu, May 14, 2015 at 02:36:55PM +0200, Rabin Vincent wrote:
> Add an unreachable() in the BUG() implementations, to get rid of
> several warnings similar to the one below:
>
> kernel/sched/core.c: In function 'pick_next_task':
> kernel/sched/core.c:2690:1: warning: control reaches end of non-void function [-Wreturn-type]
Thanks, applied!
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE
2015-05-14 12:36 ` [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE Rabin Vincent
@ 2015-05-17 19:15 ` Jesper Nilsson
0 siblings, 0 replies; 4+ messages in thread
From: Jesper Nilsson @ 2015-05-17 19:15 UTC (permalink / raw)
To: Rabin Vincent
Cc: Jesper Nilsson, linux-kernel@vger.kernel.org, linux-cris-kernel
On Thu, May 14, 2015 at 02:36:56PM +0200, Rabin Vincent wrote:
> Support for verbose BUG reporting already exists, but the HAVE flag that
> allows the option to be enabled is missing.
Thanks, applied!
/^JN - Jesper Nilsson
--
Jesper Nilsson -- jesper.nilsson@axis.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-17 19:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-14 12:36 [PATCH 1/2] CRISv32: add unreachable() to BUG() Rabin Vincent
2015-05-14 12:36 ` [PATCH 2/2] CRISv32: allow CONFIG_DEBUG_BUGVERBOSE Rabin Vincent
2015-05-17 19:15 ` Jesper Nilsson
2015-05-17 19:09 ` [PATCH 1/2] CRISv32: add unreachable() to BUG() Jesper Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).