From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753214AbcGYUyP (ORCPT ); Mon, 25 Jul 2016 16:54:15 -0400 Received: from sauhun.de ([89.238.76.85]:54986 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790AbcGYUyN (ORCPT ); Mon, 25 Jul 2016 16:54:13 -0400 Date: Mon, 25 Jul 2016 22:54:03 +0200 From: Wolfram Sang To: Nicholas Mc Guire Cc: Greg Kroah-Hartman , Wolfram Sang , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: ks7010: fix wait_for_completion_interruptible_timeout return handling Message-ID: <20160725205402.GC1698@katana> References: <1469474510-15551-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oJ71EGRlYNjSvfq7" Content-Disposition: inline In-Reply-To: <1469474510-15551-1-git-send-email-hofrat@osadl.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oJ71EGRlYNjSvfq7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 25, 2016 at 09:21:50PM +0200, Nicholas Mc Guire wrote: > wait_for_completion_interruptible_timeout return 0 on timeout and=20 > -ERESTARTSYS if interrupted. The check for=20 > !wait_for_completion_interruptible_timeout() would report an interrupt > as timeout. Further, while HZ/50 will work most of the time it could=20 Wouldn't it interpret -ERESTARTSYS as *no timeout*? Anyway, the plain !0 comparison for me clearly shows that 'interruptible' was more copy&pasted then really planned or supported. If it was, it would need to cancel something. Also, 20ms is pretty hard to cancel for a user ;) Given all that and the troubles we had with 'interruptible' in the I2C subsystem, I'd much vote for dropping interruptible here. > fail for HZ < 50, so this is switched to msecs_to_jiffies(20). Rest looks good, thanks! --oJ71EGRlYNjSvfq7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXlnxqAAoJEBQN5MwUoCm2ABkP/1VOB9r/LwL5gvMu/zeZYnaB +hliLDswNejZhfnv0Sb6c5stbPs1KhQl2IKynqUP+XECjeEVELLpc6Mkq+j7cD7S uhuvgjSBi6VKCOhXPtW8pelCkv7ZiElF7PD/z7tDtPM282xPzCs2FsSxH62IuJm5 VKyAL5S2kH7a59VfWCgjk0sZ0b/yUmirY9ZJVLROi+I5kjjeJ8ceJaR0Nn78Co9s Wi6J44aumNdU7smpyRZBfO++cd3V3p4ecTOZT9JYAF2e6NauiVDITQvLpsYOnOpg 514fpn5A5Dd9t9hYwI7s8NzwT0IzM5Cp4dfay1/Wwwvp31IeqxbVvYScaeT+srmF KYBDbzB02nNk0vjriPj/TpAH5MpoMTf4Z4KgEUteh0yBqW0wnr8LhIKSXAlHVp1W E9sMtV2SWs2f+Vdoug89OmORYBpITSc8X41s6AwDi23Zddh5uYJYGUrARPz6Z6Yr /G34crHSgfhD7KSXRhKFtIo80bPqhp7PMdllZc0vQoLz6YXsgJdIIjntHq4Bxy6R MpnBBGZgy6FVkfAvLXC0/yclVV9gyKCf54n01TtAXWQQx/si01z2iXjZSFh4YvM8 rNPWP0leazS/p6suZauvHnoNXUmtVf1eF6FHS2nRFebdAzhhownvA1p8WR/nwgGk DKnugHXEylXGdw1jWvZI =P8xG -----END PGP SIGNATURE----- --oJ71EGRlYNjSvfq7--