From 4d0e6d516934ec85af7f1b75eddad14ced7334d2 Mon Sep 17 00:00:00 2001 From: Stephane Grosjean Date: Wed, 16 Nov 2016 11:46:19 +0100 Subject: [PATCH] canfdtest: fix typo while waiting for tv_stop time After a few complaint about 100% CPU usage of canfdtest over our PCI -like boards, I have had a look to the source file, and think I have found the issue in can_echo_dut(). Signed-off-by: Marc Kleine-Budde --- canfdtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/canfdtest.c b/canfdtest.c index 2407027..d7ba740 100644 --- a/canfdtest.c +++ b/canfdtest.c @@ -239,7 +239,7 @@ static int can_echo_dut(void) } gettimeofday(&tvn, NULL); while ((tv_stop.tv_sec > tvn.tv_sec) || - ((tv_stop.tv_sec = tvn.tv_sec) && + ((tv_stop.tv_sec == tvn.tv_sec) && (tv_stop.tv_usec >= tvn.tv_usec))) gettimeofday(&tvn, NULL); }