Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760677AbbBIPBs (ORCPT ); Mon, 9 Feb 2015 10:01:48 -0500 Received: from hofr.at ([212.69.189.236]:41721 "EHLO mail.hofr.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753577AbbBIPBq (ORCPT ); Mon, 9 Feb 2015 10:01:46 -0500 Date: Mon, 9 Feb 2015 16:01:45 +0100 From: Nicholas Mc Guire To: Ezequiel Garcia Cc: Nicholas Mc Guire , David Woodhouse , Brian Norris , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: pxa3xx_nand: cleanup wait_for_completion handling Message-ID: <20150209150145.GA13655@opentech.at> References: <1422809737-3991-1-git-send-email-hofrat@osadl.org> <54D8AF6D.3080001@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54D8AF6D.3080001@free-electrons.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1675 Lines: 42 On Mon, 09 Feb 2015, Ezequiel Garcia wrote: > On 02/01/2015 01:55 PM, Nicholas Mc Guire wrote: > > return type of wait_for_completion_timeout is unsigned long not int, this > > patch uses the return value of wait_for_completion_timeout in the condition > > directly rather than assigning it to an incorrect type variable. > > > > The timeout declaration cleanup is just for readability > > > > Signed-off-by: Nicholas Mc Guire > > --- > > > > The variable used for handling the return of wait_for_cmpletion_timeout > > was int but should be unsigned long, where it was not in use for anything > > else and the return value in case of completion (>0) is not used it was > > removed and wait_for_completion_timeout() used directly in the if condition. > > > > To make the timeout values a bit simpler to read and also handle all of > > the corner cases correctly the declarations are moved to msecs_to_jiffies(). > > > > Not sure why you decided to put this explanation outside of the commit log. > It looks useful so I'd move it up. > simply because I was not sure about what should go into the log and what not but this has been clarified by Dan Carpenter - should have it correct in future patches. > > This patch was only compile tested for pxa3xx_defconfig > > (implies CONFIG_MTD_NAND_PXA3xx=y) > > > > The change looks good, but I would like someone to test it on real hardware. thx! hofrat -- 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/