[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1350552439.3072.65.camel@joe-AO722>
Date: Thu, 18 Oct 2012 02:27:19 -0700
From: Joe Perches <joe@...ches.com>
To: Mischa Jonker <Mischa.Jonker@...opsys.com>
Cc: "dmitry.torokhov@...il.com" <dmitry.torokhov@...il.com>,
"m.d.s.x.jonker@...il.com" <m.d.s.x.jonker@...il.com>,
"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"arc-linux-dev@...opsys.com" <arc-linux-dev@...opsys.com>
Subject: Re: [PATCH v3 1/1] Input: serio - Add ARC PS/2 driver
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists