Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933060AbbENMhu (ORCPT ); Thu, 14 May 2015 08:37:50 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:36620 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932650AbbENMhs (ORCPT ); Thu, 14 May 2015 08:37:48 -0400 From: Rabin Vincent To: jesper.nilsson@axis.com Cc: linux-kernel@vger.kernel.org, linux-cris-kernel@axis.com, Rabin Vincent Subject: [PATCH 1/2] CRISv32: add unreachable() to BUG() Date: Thu, 14 May 2015 14:36:55 +0200 Message-Id: <1431607016-6301-1-git-send-email-rabin@rab.in> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1583 Lines: 49 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/