Date: Sun, 16 Feb 2003 01:13:01 -0500 (EST) From: "Matthew N. Dodd" <winter@jurai.net> To: Nate Lawson <nate@root.org> Cc: current@FreeBSD.ORG, wpaul@FreeBSD.ORG Subject: Re: sys/pci/if* fixes Message-ID: <20030216011126.D73971@sasami.jurai.net> In-Reply-To: <Pine.BSF.4.21.0302152147310.43757-100000@root.org> References: <Pine.BSF.4.21.0302152147310.43757-100000@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 15 Feb 2003, Nate Lawson wrote: > The 'if' is a matter of coding style. Which is preferred: multiple > returns from the same function (one which is only reachable from a goto) > or one linear path with an 'if' to see if this is an error exit? In this case a single return is harder to read. > See the previous thread on this regarding my original dc(4) changes. > It is bogus to create a lock with mtx_init and then immediately lock it > for the entire attach routine just for the intention of ensuring > exclusive access to the device. The problem is that the drivers aren't properly turning off interrrupts before setting up the interrupt handler. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030216011126.D73971>