Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932544AbbDMN6b (ORCPT ); Mon, 13 Apr 2015 09:58:31 -0400 Received: from mail-pa0-f50.google.com ([209.85.220.50]:35056 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932513AbbDMN6S (ORCPT ); Mon, 13 Apr 2015 09:58:18 -0400 Date: Mon, 13 Apr 2015 15:58:13 +0200 From: Thierry Reding To: Nicholas Mc Guire Cc: David Airlie , Rob Clark , Mark Brown , Stephen Rothwell , Hai Li , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] drm/msm: match wait_for_completion_timeout return type Message-ID: <20150413135812.GA11328@ulmo.nvidia.com> References: <1428757838-10431-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: <1428757838-10431-1-git-send-email-hofrat@osadl.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2886 Lines: 81 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 11, 2015 at 03:10:36PM +0200, Nicholas Mc Guire wrote: > return type of wait_for_completion_timeout is unsigned long not int, this > patch assigns the return value of wait_for_completion_timeout to an > appropriately typed and named variable. >=20 > Signed-off-by: Nicholas Mc Guire > --- >=20 > This was compile tested with qcom_defconfig + > CONFIG_DRM=3Dm (implies CONFIG_DRM_MSM=3Dm) >=20 > Patch is against 4.0-rc7 (localversion-next is -next-20150410) >=20 > drivers/gpu/drm/msm/edp/edp_ctrl.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/gpu/drm/msm/edp/edp_ctrl.c b/drivers/gpu/drm/msm/edp= /edp_ctrl.c > index 0ec5abd..831acd6 100644 > --- a/drivers/gpu/drm/msm/edp/edp_ctrl.c > +++ b/drivers/gpu/drm/msm/edp/edp_ctrl.c > @@ -1018,7 +1018,7 @@ static void edp_ctrl_off_worker(struct work_struct = *work) > { > struct edp_ctrl *ctrl =3D container_of( > work, struct edp_ctrl, off_work); > - int ret; > + unsigned long time_left; > =20 > mutex_lock(&ctrl->dev_mutex); > =20 > @@ -1030,11 +1030,11 @@ static void edp_ctrl_off_worker(struct work_struc= t *work) > reinit_completion(&ctrl->idle_comp); > edp_state_ctrl(ctrl, EDP_STATE_CTRL_PUSH_IDLE); > =20 > - ret =3D wait_for_completion_timeout(&ctrl->idle_comp, > + time_left =3D wait_for_completion_timeout(&ctrl->idle_comp, > msecs_to_jiffies(500)); > - if (ret <=3D 0) > - DBG("%s: idle pattern timedout, %d\n", > - __func__, ret); > + if (time_left <=3D 0) Given that time_left is unsigned now, why bother with the "< 0"? Thierry --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVK8t0AAoJEN0jrNd/PrOhblgQALDyaNAdpmF0b90nGrg9dzvJ V+zLD/Atk3YUeWjrYUUaxy0dsB/hhYHrSYyZPDKQsBEctFcWvD0tif+1QMNIc8dD V+F7bbEukF9yXlcPwEsWIpSvfWV7A2VCUirncWksu1m1TS577nnRVq0w3uQE8Wud AZzQ0V6H4lj7dWrPZUOi3uBkRaTcoPWSeeJ1ldeGywuWxiPMbubCbrqxMQreAT5N DPl+UYbNTQOB0OEZxBmaWsZDrkYlRnuFA11EnXq/rm5NtRerqvcc/s3QuV7MLoK6 DJDFEWvDfV3wYDtScYtWlYZsMrF1/0mPxRzkxQHagbCkNG8+nNeWrwcLt5QdVnZe cwfkqpD7V8zmvn3ya/S8xRAxarZhGiD2ROCvxqTOOT0GLhX1uCjsUk4rjuw1UMa0 K0ZY4T3IwRWr0SokMiAeBCLYD0t8zP/pGHfo8j86WidTZu7E5YkJtN+sE8cLKq72 k46kVFhK1vNUUbsXBJyok1yfPwQ3JUVNSYYtmyLF1mpswqtKE/AOT7e3ykdwsdb2 GZ5d1NBI+O2n77aXTWtBu8KihS0mdUnWJ6hb479G1/euoPLUcnkewPx+xPyb6/D2 B6tuRLK0Dza/reVFIG0FVNn/ywk5ujDOg72OSeTvPZInt1s1ShpPFf43RAFmCQYa TGaiqz5k4vIbH02swUHg =P51O -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/