They both do the same thing, (expr || printk(...)) will cause the printk to only
evaluate when expr is false, it's just a more compact way of writing it.
But yeah, I think it would be a worthwhile thing to do and people shouldn't
really be worrying about only enabling it in various functions, this particular
KERNEL_ASSERT() macro should only be used to make sure a particular expression
is true... if it's false, it's a bug and someone needs to fix it. Enabling this
macro on a 100% working system should never result in any printk()'s...
So if your ethernet driver is having it's memory not allocated correctly, a
KERNEL_ASSERT() in the memory subsystem and the ethernet driver would help you
to understand why whereas enabling it just in the ethernet driver may not.
Just food for thought.
Jordan
-- Jordan Mendelson : http://jordy.wserv.com Web Services, Inc. : http://www.wserv.com- 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/