What consensus do you see here? Two people? I didn't even see any
cases where this behavior was said to be used -- only said to be
needed in a few rare cases.
AC posted in this thread, saying that assert code already exists in the
kernel, in the networking code (grep for BUG_TRAP). Guess what? It
evaluates to null. In fact, grepping around, every assert macro I could
find in the kernel (not many, granted) evaluates to null in its
non-debug form.
Evaluating to null is the standard set by both the existing kernel
sources and ANSI C. NOT evaluating to null potentially slows down a
fast path, if a kassert() is used there. Why use it, if it breaks with
tradition and creates slower production code?
So, my suggested updates to your kassert.h:
o Evaluate to null in non-debug form ;-) Copy code from BUG_TRAP
instead of simply "#define kassert(cond)". It wraps a null do-while.
o Allow developer to redefine REPORT_LEVEL by wrapping it in an #ifndef
o Is there some central file that the CONFIG_xxx selection can be moved
to, so avoid changing each port's Config.in? Maybe source
linux/kernel/Config.in (new file) from each port instead.
There are too much common stuff in the port Config.in's anyway, IMHO.
Regards,
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/