[PATCH] RFCv2: omapdrm DRM/KMS driver for TI OMAP platforms

Konrad Rzeszutek Wilk konrad.wilk at oracle.com
Mon Sep 26 12:21:32 PDT 2011


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));


More information about the dri-devel mailing list