Re: [PATCH 10/16] drivers/net/ethernet/ibm/emac/mal.c: use WARN

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

 



While looking i have noticed that a lot of drivers define there private "assert" macro.
It is very similar to warn.

(e.g.)
#define RTL819x_DEBUG
#ifdef RTL819x_DEBUG
#define assert(expr) \
       if (!(expr)) {                                  \
                printk( "Assertion failed! %s,%s,%s,line=%d\n", \
               #expr,__FILE__,__FUNCTION__,__LINE__);          \
       }

WARN is more complicated. At least with the right debugging options turned on, it dumps the stack, via warn_slowpath_common.

julia
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux