Re: [PATCH] add typecheck on irqsave and friends for correct flags

From: Steven Rostedt
Date: Thu May 01 2008 - 21:16:59 EST



On Thu, 1 May 2008, Andrew Morton wrote:
> > This patch adds a typecheck inside the irqsave and restore functions
> > to flag these cases.
>
> hm, not exactly a thing of beauty, but it could have been worse.

Beauty is in the eye of the beholder.
(a mother always thinks their kid is beautiful ;-).

>
>
> If we had implemeted these things properly, as
>
> unsigned long spin_lock_irqsave(spinlock_t *lock);

Then we would have been forced to do the

irqflags_t spin_lock_irqsave(spinlock_t *lock);

trick. Which would probably be the better long term solution, but the
biggest PITA for you in the short term.

-- Steve

>
> then we wouldn't be able to do this at all.
>
> Oh well, thanks, I'll toss it in there. Maybe this should go into
> git-sched (aka git-omnibus)?
>
>
--
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/