Re: adm1026 driver port for kernel 2.6.10-rc2 [RE-REVISED DRIVER]

From: Arjan van de Ven
Date: Mon Nov 22 2004 - 16:11:14 EST



> > this locking construct is rahter awkward; is it possible to refactor the
> > code such that you can down and up in the same function ?
>
> Yes, at the cost of some minor code duplication or the introduction of
> another variable. Is that preferable? Is holding the lock across function
> calls a Bad Idea?

holding lock across function calls isn't, unlocking in another function than you take the lock is.
For one it makes auditing the code a lot harder.


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