public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next] selftests: timers: Remove the unneeded result variable
@ 2022-09-20  6:32 cgel.zte
  2022-09-20  7:46 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-09-20  6:32 UTC (permalink / raw)
  To: shuah
  Cc: jstultz, tglx, sboyd, linux-kernel, linux-kselftest, ye xingchen,
	Zeal Robot

From: ye xingchen <ye.xingchen@zte.com.cn>

Return the value adjtimex() directly instead of storing it in another
redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
 tools/testing/selftests/timers/valid-adjtimex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/testing/selftests/timers/valid-adjtimex.c b/tools/testing/selftests/timers/valid-adjtimex.c
index 48b9a803235a..4bca39e0bd16 100644
--- a/tools/testing/selftests/timers/valid-adjtimex.c
+++ b/tools/testing/selftests/timers/valid-adjtimex.c
@@ -50,12 +50,10 @@ int clock_adjtime(clockid_t id, struct timex *tx)
 int clear_time_state(void)
 {
 	struct timex tx;
-	int ret;
 
 	tx.modes = ADJ_STATUS;
 	tx.status = 0;
-	ret = adjtimex(&tx);
-	return ret;
+	return adjtimex(&tx);
 }
 
 #define NUM_FREQ_VALID 32
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-20  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20  6:32 [PATCH linux-next] selftests: timers: Remove the unneeded result variable cgel.zte
2022-09-20  7:46 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox