Search Linux Wireless

Re: [PATCH 02/10] iwlagn: remove most BUG_ON instances

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2011-04-19 at 14:00 +0200, Stanislaw Gruszka wrote:
> On Mon, Apr 18, 2011 at 09:44:09AM -0700, Wey-Yi Guy wrote:
> > From: Johannes Berg <johannes.berg@xxxxxxxxx>
> > @@ -394,7 +394,9 @@ int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
> >  		return -EINVAL;
> >  	}
> >  
> > -	BUG_ON(addr & ~DMA_BIT_MASK(36));
> > +	if (WARN_ON(addr & ~DMA_BIT_MASK(36)))
> > +		return -EINVAL;
> Seems useless.

Better than the BUG_ON, mostly to catch programmer errors though I
guess.

> > @@ -169,10 +171,12 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
> >  	int cmd_idx;
> >  	int ret;
> >  
> > -	lockdep_assert_held(&priv->mutex);
> I think better keep it.

Oh, that must be a merge error, I don't remember doing that.

johannes

--------------------------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland 
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±ÿ«zW¬³ø¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux