All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>,
	Stephane Grosjean <s.grosjean@peak-system.com>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [PATCH]: canfdtest typo while waiting for tv_stop time
Date: Mon, 21 Nov 2016 11:37:50 +0100	[thread overview]
Message-ID: <a894b911-d037-c58e-635f-c415d01d4c30@pengutronix.de> (raw)
In-Reply-To: <SG2PR06MB10387876750D66073C215FF4C3B10@SG2PR06MB1038.apcprd06.prod.outlook.com>


[-- Attachment #1.1: Type: text/plain, Size: 1516 bytes --]

On 11/17/2016 09:09 AM, Ramesh Shanmugasundaram wrote:
>> Subject: [PATCH]: canfdtest typo while waiting for tv_stop time
>>
>> 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?
> 
> There is one more bug on that piece of code. I submitted a bug & a pull request fixing it
> 
> https://github.com/linux-can/can-utils/pull/15

See github for the review.

Thanks,
Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2016-11-21 10:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-11-21 10:36 ` Marc Kleine-Budde

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=a894b911-d037-c58e-635f-c415d01d4c30@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=linux-can@vger.kernel.org \
    --cc=ramesh.shanmugasundaram@bp.renesas.com \
    --cc=s.grosjean@peak-system.com \
    /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 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.