lkml.org 
[lkml]   [2006]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] fix common mistake in polling loops
    On 7/28/06, Zed 0xff <zed.0xff@gmail.com> wrote:
    > @@ -955,11 +956,15 @@ static void psmouse_resync(void *p)
    > * repeat our attempts 5 times, otherwise we may be left out with disabled
    > * mouse.
    > */
    > - for (i = 0; i < 5; i++) {
    > + timeout = jiffies + msecs_to_jiffies(1000);
    > + for (;;) {
    > if (!ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE)) {
    > enabled = 1;
    > break;
    > }
    > + if (time_after(timeout, jiffies)) {
    > + break;
    > + }
    > msleep(200);
    > }
    >

    NAK. Have you read the comment above (that is partially visible in
    your diff)? I do not really care about timeout here, I want my mouse
    working.

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

    \
     
     \ /
      Last update: 2006-07-28 14:45    [W:0.021 / U:120.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site