Re: [PATCH v5] HPET: Remove the BKL.

From: Andi Kleen
Date: Tue Oct 21 2008 - 13:35:36 EST


David John <davidjon@xxxxxxxxxxx> writes:

> switch (cmd) {
> case HPET_IE_OFF:
> - if ((devp->hd_flags & HPET_IE) == 0)
> + spin_lock_irq(&hpet_lock);
> + if ((devp->hd_flags & HPET_IE) == 0) {
> + spin_unlock_irq(&hpet_lock);
> break;

Reads don't need to be locked here, so you could just move the spin_lock_irq
down a bit and avoid the redundant unlock_irq. Same below.

> + }

-Andi

--
ak@xxxxxxxxxxxxxxx
--
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/