From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] RFCv2: omapdrm DRM/KMS driver for TI OMAP platforms Date: Mon, 26 Sep 2011 15:21:32 -0400 Message-ID: <20110926192132.GA26714@phenom.oracle.com> References: <1316295129-3600-1-git-send-email-rob.clark@linaro.org> <20110921223210.GA26166@phenom.oracle.com> <20110926135544.GA4102@phenom.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by gabe.freedesktop.org (Postfix) with ESMTP id 6555D9E7E8 for ; Mon, 26 Sep 2011 12:21:49 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20110926135544.GA4102@phenom.oracle.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Rob Clark Cc: Inki Dae , dri-devel@lists.freedesktop.org, patches@linaro.org List-Id: dri-devel@lists.freedesktop.org On Mon, Sep 26, 2011 at 09:55:44AM -0400, Konrad Rzeszutek Wilk wrote: > > >> + =A0 =A0 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));