All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: canfdtest typo while waiting for tv_stop time
@ 2016-11-16 10:46 Stephane Grosjean
  2016-11-17  8:09 ` Ramesh Shanmugasundaram
  2016-11-21 10:36 ` Marc Kleine-Budde
  0 siblings, 2 replies; 4+ messages in thread
From: Stephane Grosjean @ 2016-11-16 10:46 UTC (permalink / raw)
  To: Marc Kleine-Budde, linux-can

Hello Mark,

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:

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);
                         }

Am I right?

Regards,

Stéphane

--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt - HRB 9183 
Geschaeftsfuehrung: A.Gach, U.Wilhelm
--

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

end of thread, other threads:[~2016-11-21 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-16 10:46 [PATCH]: canfdtest typo while waiting for tv_stop time Stephane Grosjean
2016-11-17  8:09 ` Ramesh Shanmugasundaram
2016-11-21 10:37   ` Marc Kleine-Budde
2016-11-21 10:36 ` Marc Kleine-Budde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.