mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Ley Foon Tan <lftan@altera.com>,
	nios2-dev@lists.rocketboards.org, linux-kernel@vger.kernel.org,
	Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH -next] nios2: time: Fix build error and warning
Date: Fri, 17 Jun 2016 06:47:03 -0700	[thread overview]
Message-ID: <1466171223-30963-1-git-send-email-linux@roeck-us.net> (raw)

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 <daniel.lezcano@linaro.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 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

             reply	other threads:[~2016-06-17 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 13:47 Guenter Roeck [this message]
2016-06-17 17:23 ` Daniel Lezcano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1466171223-30963-1-git-send-email-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=daniel.lezcano@linaro.org \
    --cc=lftan@altera.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nios2-dev@lists.rocketboards.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®