On Mon, Sep 26, 2011 at 09:55:44AM -0400, Konrad Rzeszutek Wilk wrote:
- commit(crtc);
So no checking of its return value.. Should you at least wrap it with WARN_ON(?)
Is it safe to rely on the "payload" of the WARN_ON() always being evaluated, or is there any scenario that you could have something like
Hmm, good question. I assumed so, but you got me thinking.
#define WARN_ON(X)
ie., is this safe:
WARN_ON(commit(crtc));
it looked like different archs can provide their own WARN_ON, so wasn't sure how much to trust it..
asm-generic/bug.h has the "right" implementation. If other architectures redefine as your have pointed out - then that looks like a bug.
A: Yes, it is safe to do WARN_ON(commit(rctc));