Search Linux Wireless

Re: [patch 1/2] Merge the Sonics Silicon Backplane subsystem

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

 



On Fri, 13 Jul 2007 00:10:58 +0200
Michael Buesch <mb@xxxxxxxxx> wrote:

> > So the principle of least surprise tells us "this shouldn't be called
> > assert()".
> 
> Well, I do know that userspace assert() terminates the program.
> But, in the kernel we use BUG() for this.
> So let's better rename BUG() to assert() ;)
> No just kidding.
> IMO the word "assert" is short and to the point what this code
> is actually doing. It asserts that a condition is true and
> complains otherwise.
> 
> Let's make a deal, Andrew.
> As I almost always do assert(0), I will remove the assert() macro
> and introduce a macro SSB_CAN_NOT_REACH() or something like that
> to mark codepaths that can not be reached.
> I'll replace the rest of the assert()s that check an actual condition
> with WARN_ON.
> OK?

I don't understand all the fuss.

When I looked at that code I assumed that your assert() implementation
would be a wrapper of some from around a BUG().  But it wasn't.

A suitable way of preventing others from being similarly surprised would be
to call it something other than assert().  That's all.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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