Re: [PATCH] drivers/scsi/pm8001/pm8001_sas.c: move timer start

From: Dan Williams
Date: Wed Feb 22 2012 - 17:55:34 EST


On Wed, Feb 22, 2012 at 12:55 PM, Julia Lawall <Julia.Lawall@xxxxxxx> wrote:
> From: Julia Lawall <Julia.Lawall@xxxxxxx>
>
> Move the add_timer below some instructions that do not seem to require a
> timer and that in one case can fail, thus avoiding the need for a
> corresponding del_timer.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@xxxxxxx>
>
> ---
> I don't fully understand the code, and have not tested the change.  Think
> of this patch as more of a question as to whether this is the right thing
> to do.

This patch makes sense to me... don't start the timer until we're sure
that the task is going to be submitted, or at least remember to
del_timer() before returning.

Looks like pm8001_exec_internal_tmf_task() gets this right.

--
Dan
--
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/