Subject: Re: [RFC][BNX2X]: New driver for Broadcom 10Gb Ethernet.

From: Michael Buesch <[email-masked]>
Date: Wed, 8 Aug 2007 00:20:35 +0200

On Wednesday 08 August 2007 00:15:47 Jeff Garzik wrote:
> Michael Buesch wrote:
> > On Wednesday 01 August 2007 10:31:17 Michael Chan wrote:
> >> +static irqreturn_t bnx2x_msix_sp_int(int irq, void *dev_instance)
> >> +{
> >> +	struct net_device *dev = dev_instance;
> > 
> > You need to check if dev==NULL and bail out.
> > Another driver sharing the IRQ with this might choose to pass the dev
> > pointer as NULL.
> 
> NAK that advice:  It is pointless having such a check in the hottest of 
> driver hot paths, since a large majority of drivers do not have such a 
> check.
> 
> It is better to fix the extremely rare oddball that passes NULL to 
> request_irq(), than to update all drivers to be slower due to the oddballs.

Ah, well. IMO one should better go safe than Oops. ;)
It's not that an if branch takes more than 2 or 3 CPU cycles at worst.
But well, if you don't like it, I can live without it, too.

-- 
Greetings Michael.