dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer
Date: Sun, 19 Jun 2011 21:04:29 +0100	[thread overview]
Message-ID: <013811$h8fkv@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <20110619192211.GA23889@pengutronix.de>

On Sun, 19 Jun 2011 21:22:11 +0200, Wolfram Sang <w.sang@pengutronix.de> wrote:
> On Thu, Jun 16, 2011 at 04:47:53PM +0100, Chris Wilson wrote:
> > On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > > On Thu, 16 Jun 2011 15:28:46 +0200
> > > Wolfram Sang <w.sang@pengutronix.de> wrote:
> > > > How about BUG_ON(!ptr) in the init-routine for a bit more grace? And/or
> > > > a warning in the else-block? It seems to happen to users...
> > > 
> > > Yeah, a BUG_ON would be fine.
> > 
> > if (WARN_ON(!ptr, "no display vtable"))
> > 	return -ENODEV;
> 
> That would mean converting the involved void-functions to int to propagate the
> error (intel_init_clock_gating, intel_modeset_init). Not a big deal, but quite
> intrusive. Do you really mean that?

A choice between a BUG_ON and error propagation? Choose error propagation,
one day it will be for real. ;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2011-06-19 20:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-15 22:24 [PATCH] drm/i915: add check for valid init_clock_gating-pointer Wolfram Sang
2011-06-15 22:30 ` Jesse Barnes
2011-06-16 13:28   ` Wolfram Sang
2011-06-16 15:15     ` Jesse Barnes
2011-06-16 15:47       ` Chris Wilson
2011-06-19 19:22         ` Wolfram Sang
2011-06-19 20:04           ` Chris Wilson [this message]
2011-06-20 16:10             ` [PATCH] drm/i915: gracefully bail out when init_clock_gating-pointer is not set Wolfram Sang
2011-06-20 16:43               ` Chris Wilson
2011-06-20 17:36                 ` [PATCH V2] " Wolfram Sang
2011-06-20 17:38                   ` Jesse Barnes
2011-07-02 15:55                     ` Wolfram Sang
2011-07-02 18:00                       ` Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='013811$h8fkv@fmsmga002.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=w.sang@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox