From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfram Sang Subject: Re: [PATCH] drm/i915: add check for valid init_clock_gating-pointer Date: Sun, 19 Jun 2011 21:22:11 +0200 Message-ID: <20110619192211.GA23889@pengutronix.de> References: <1308176679-13766-1-git-send-email-w.sang@pengutronix.de> <20110615153000.00438750@jbarnes-desktop> <20110616132846.GE23579@pengutronix.de> <20110616081557.5f64f603@jbarnes-desktop> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0368056953==" Return-path: Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [92.198.50.35]) by gabe.freedesktop.org (Postfix) with ESMTP id 8BAF09E82D for ; Sun, 19 Jun 2011 12:41:18 -0700 (PDT) In-Reply-To: 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: Chris Wilson Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0368056953== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 16, 2011 at 04:47:53PM +0100, Chris Wilson wrote: > On Thu, 16 Jun 2011 08:15:57 -0700, Jesse Barnes wrote: > > On Thu, 16 Jun 2011 15:28:46 +0200 > > Wolfram Sang 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... > >=20 > > Yeah, a BUG_ON would be fine. >=20 > 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 qu= ite intrusive. Do you really mean that? --=20 Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk3+TGMACgkQD27XaX1/VRszJQCgsD51KYmJgWYYpKYaOilq89O3 pQ8An2q2znzytdkN+TnE9iL+M18+4ET9 =YGEo -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc-- --===============0368056953== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0368056953==--