From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754155AbbCaBbH (ORCPT ); Mon, 30 Mar 2015 21:31:07 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:32781 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbbCaBbE (ORCPT ); Mon, 30 Mar 2015 21:31:04 -0400 Date: Mon, 30 Mar 2015 18:30:58 -0700 From: Brian Norris To: Nicholas Mc Guire Cc: Ezequiel Garcia , David Woodhouse , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: pxa3xx_nand: cleanup wait_for_completion handling Message-ID: <20150331013058.GQ32500@ld-irv-0074> References: <1422809737-3991-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422809737-3991-1-git-send-email-hofrat@osadl.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 01, 2015 at 11:55:37AM -0500, 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(). > > This patch was only compile tested for pxa3xx_defconfig > (implies CONFIG_MTD_NAND_PXA3xx=y) > > Patch is against 3.0.19-rc6 -next-20150130 Reworked the commit message a bit and pushed to l2-mtd.git. Brian