Linux Input/HID development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mischa Jonker <Mischa.Jonker@synopsys.com>
Cc: "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	"m.d.s.x.jonker@gmail.com" <m.d.s.x.jonker@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"arc-linux-dev@synopsys.com" <arc-linux-dev@synopsys.com>
Subject: Re: [PATCH v3 1/1] Input: serio - Add ARC PS/2 driver
Date: Thu, 18 Oct 2012 02:27:19 -0700	[thread overview]
Message-ID: <1350552439.3072.65.camel@joe-AO722> (raw)
In-Reply-To: <E6BF041E97966E4DB955F0DF883AD2D6019A63@DE02WEMBX1.internal.synopsys.com>

On Thu, 2012-10-18 at 09:05 +0000, Mischa Jonker wrote:
> Hi Joe,
> 
> >> +	while (1) {
> >infinite loop with bad hardware?
> >Perhaps a jiffies timeout?
> 
> What do you suggest? Add a counter and limit the maximum number of iterations to an arbitrary number (say 1000)?

Yes, something like that.
Or something like:

	unsigned long timeout = jiffies + somevalue;
	while (time_before(jiffies, timeout) {
		etc...
	}

cheers, Joe


      reply	other threads:[~2012-10-18  9:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-18  8:36 [PATCH v3 0/1] Input: serio - Add ARC PS/2 driver Mischa Jonker
2012-10-18  8:36 ` [PATCH v3 1/1] " Mischa Jonker
2012-10-18  9:01   ` Joe Perches
2012-10-18  9:05     ` Mischa Jonker
2012-10-18  9:27       ` Joe Perches [this message]

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=1350552439.3072.65.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=Mischa.Jonker@synopsys.com \
    --cc=arc-linux-dev@synopsys.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.d.s.x.jonker@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox