[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87abcxetr5.fsf@basil.nowhere.org>
Date: Tue, 21 Oct 2008 19:35:26 +0200
From: Andi Kleen <andi@...stfloor.org>
To: David John <davidjon@...ontk.org>
Cc: mingo@...e.hu, akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
linux-kernel@...r.kernel.org, venkatesh.pallipadi@...el.com,
tglx@...utronix.de
Subject: Re: [PATCH v5] HPET: Remove the BKL.
David John <davidjon@...ontk.org> 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@...ux.intel.com
--
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