Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1715382

[PATCH 2/6] kselftests: timers: freq-step: Fix build warning

From John Stultz <john.stultz@linaro.org>
Newsgroups linux.kernel
Subject [PATCH 2/6] kselftests: timers: freq-step: Fix build warning
Date 2017-08-18 21:00 +0200
Message-ID <ufUEW-7yR-39@gated-at.bofh.it> (permalink)
References <ufUEV-7yR-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Fixes the following build warning:
freq-step.c: In function ‘main’:
freq-step.c:271:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

By returning the return values from ksft_success/fail.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 tools/testing/selftests/timers/freq-step.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/timers/freq-step.c b/tools/testing/selftests/timers/freq-step.c
index 934a308..926828e 100644
--- a/tools/testing/selftests/timers/freq-step.c
+++ b/tools/testing/selftests/timers/freq-step.c
@@ -266,7 +266,7 @@ int main(int argc, char **argv)
 	set_frequency(0.0);
 
 	if (fails)
-		ksft_exit_fail();
+		return ksft_exit_fail();
 
-	ksft_exit_pass();
+	return ksft_exit_pass();
 }
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[GIT PULL][PATCH 0/6] Timekeeping queue for 4.14 John Stultz <john.stultz@linaro.org> - 2017-08-18 21:00 +0200
  [PATCH 5/6] timekeeping: Use proper timekeeper for debug code John Stultz <john.stultz@linaro.org> - 2017-08-18 21:00 +0200
  [PATCH 1/6] kselftests: timers: freq-step: Define ADJ_SETOFFSET if device has older kernel headers John Stultz <john.stultz@linaro.org> - 2017-08-18 21:00 +0200
  [PATCH 4/6] kselftests: timers: set-timer-lat: Add one-shot timer test cases John Stultz <john.stultz@linaro.org> - 2017-08-18 21:00 +0200
  [PATCH 2/6] kselftests: timers: freq-step: Fix build warning John Stultz <john.stultz@linaro.org> - 2017-08-18 21:00 +0200

csiph-web