From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm: shmob_drm: Check clk_prepare_enable() return value Date: Wed, 4 Dec 2013 11:01:07 +0100 Message-ID: <20131204100106.GS19943@ulmo.nvidia.com> References: <1385945540-20710-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> <20131203095923.GD21178@ulmo.nvidia.com> <37481163.oH5TkQcYhz@avalon> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2128546877==" Return-path: Received: from mail-bk0-f44.google.com (mail-bk0-f44.google.com [209.85.214.44]) by gabe.freedesktop.org (Postfix) with ESMTP id B823DFB54A for ; Wed, 4 Dec 2013 02:02:06 -0800 (PST) Received: by mail-bk0-f44.google.com with SMTP id d7so6570677bkh.3 for ; Wed, 04 Dec 2013 02:02:05 -0800 (PST) In-Reply-To: <37481163.oH5TkQcYhz@avalon> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Laurent Pinchart Cc: Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============2128546877== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MT9SxUWSsctiw0kG" Content-Disposition: inline --MT9SxUWSsctiw0kG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 04, 2013 at 02:38:21AM +0100, Laurent Pinchart wrote: > Hi Thierry, >=20 > On Tuesday 03 December 2013 10:59:24 Thierry Reding wrote: > > On Mon, Dec 02, 2013 at 01:52:20AM +0100, Laurent Pinchart wrote: > > [...] > >=20 > > > diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > > b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c > > [...] > >=20 > > > @@ -170,7 +178,9 @@ static void shmob_drm_crtc_start(struct shmob_drm= _crtc > > > *scrtc) > > > return; > > > =09 > > > /* Enable clocks before accessing the hardware. */ > > > - shmob_drm_clk_on(sdev); > > > + ret =3D shmob_drm_clk_on(sdev); > > > + if (ret < 0) > > > + return; > >=20 > > Perhaps this should be printing an error or using WARN_ON()? Otherwise > > it might be very difficult to diagnose what's going wrong. >=20 > That's a good point. In practice, as the driver always uses a Renesas SoC= MSTP=20 > clock, the clock code will print a message to the kernel log though, so I= 'm=20 > not sure whether we should duplicate that here. If you think we should I'= ll=20 > submit a new patch. Is that one of the clocks implemented in drivers/sh/clk? There don't seem to be any error messages in the clk_enable() implementation. Thierry --MT9SxUWSsctiw0kG Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJSnv1iAAoJEN0jrNd/PrOhVnkP/2P3tHWuvKczl2B0Uiwpmxu4 8RJnUF0dcARYKIhuknap3ppybd1hYxIAwSjcgDI26NHCaKjOJIvNEpHEu26A7dbg PAQXTAE770lSQwzfiTVayhBocO3MXhOrTWveSfdsDfY+e4p2mfAlD7IPkvCiAGb7 AyvEpR8MJXe1r3UQ+s46yGguQDj508T6mFiIepYUSJUHLuHMEdFtBaaIAWN0sYGs yp3coCbthqRwP7OA6AFtwKGaB5LYDRsQwLybwNSiqSKh1MwFHZl8VENCI/w7/M2B SJltsVr5WI6cnh74vqzYEq+BL3NJx5difhnT6yKEHRPE1zLyiTttRkORzMtwi23U Fb1TKSrhAZhEFUGjcr1I8d4Vt7u0VB309h8Sy9SLiWBFWejaMapRTYAdWvAFgvDs CEepIEfPZQBujm+TwEV1YcNRvF6R6TCK2wCP3UmCGyZ2RCoKfu1p8o1s3K1wefOZ 4C9KlIyZ+nFvnIWmwW1gKxejXK0PCabeA6Xoo6Tt1QRuwgvV1jM9uMMTX6wEpVGJ T2f0H9OqBjCp3orCZDqvwok6/hWakveOQiczQYe5GjbX2K4buvPOs5rJFtOxq95n uptfFfrJk5QH2c6UELrQyggdQwy2nIbP1prn3SyHeFljtkWYXexFcEf2izdffaN4 2VQPR6+LFg0d5cVqdWMZ =rKyH -----END PGP SIGNATURE----- --MT9SxUWSsctiw0kG-- --===============2128546877== 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 --===============2128546877==--