From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754219AbcFQNrZ (ORCPT ); Fri, 17 Jun 2016 09:47:25 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:51008 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbcFQNrY (ORCPT ); Fri, 17 Jun 2016 09:47:24 -0400 From: Guenter Roeck To: Daniel Lezcano Cc: Ley Foon Tan , nios2-dev@lists.rocketboards.org, linux-kernel@vger.kernel.org, Guenter Roeck Subject: [PATCH -next] nios2: time: Fix build error and warning Date: Fri, 17 Jun 2016 06:47:03 -0700 Message-Id: <1466171223-30963-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.5.0 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org nios2 builds fail with arch/nios2/kernel/time.c: In function 'time_init': arch/nios2/kernel/time.c:354:2: warning: 'return' with a value, in function returning void include/linux/of.h:999:2: warning: ISO C90 forbids mixed declarations and code include/linux/of.h:999:22: error: expected declaration or statement at end of input Fixes: 2ef9162920dc ("clocksource/drivers/nios2: Convert init function to return error") Cc: Daniel Lezcano Signed-off-by: Guenter Roeck --- arch/nios2/kernel/time.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c index f337eefdccbd..d9563ddb337e 100644 --- a/arch/nios2/kernel/time.c +++ b/arch/nios2/kernel/time.c @@ -346,12 +346,10 @@ void __init time_init(void) for_each_compatible_node(np, NULL, ALTR_TIMER_COMPATIBLE) count++; - if (count < 2) { + if (count < 2) panic("%d timer is found, it needs 2 timers in system\n", count); clocksource_probe(); - - return 0; } CLOCKSOURCE_OF_DECLARE(nios2_timer, ALTR_TIMER_COMPATIBLE, nios2_time_init); -- 2.5.0