Re: [patch 05/14] char/hvsi: use wait_event_timeout()

From: Nish Aravamudan
Date: Sun Mar 06 2005 - 23:57:46 EST


On Sun, 6 Mar 2005 19:32:36 -0800, Andrew Morton <akpm@xxxxxxxx> wrote:
> domen@xxxxxxxxxxxx wrote:
> >
> > Please consider applying. This is my first wait-queue related patch, so comments
> > are very welcome.
> >
> > Use wait_event_timeout() in place of custom wait-queue code. The
> > code is not changed in any way (I don't think), but is cleaned up quite a bit
> > (will get expanded to almost identical code).
> >
> > ...

<snip>

> > + if(!wait_event_timeout(hp->stateq, (hp->state == state), jiffies + HVSI_TIMEOUT))
> > + ret = -EIO;
>
> wait_event_timeout()'s `timeout' arg is number-of-milliseconds-to-wait,
> not an absolute time, yes?

D'oh. I will fix this and any other timeout version that are being
pushed to you tomorrow. Sadly, wait_event*() do not take milliseconds,
but jiffies. I am hoping to push some patches to change that, but it
may have to wait a while.

> Also, it's conventional to put a space between the `if' and the `('.
>
> It's nice to squeeze the code into an 80-column xterm, too.

Will fix these both as well.

Thanks,
Nish
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/