From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754069AbbCaBKv (ORCPT ); Mon, 30 Mar 2015 21:10:51 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:33031 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752066AbbCaBKr (ORCPT ); Mon, 30 Mar 2015 21:10:47 -0400 Date: Mon, 30 Mar 2015 18:10:41 -0700 From: Brian Norris To: Han Xu Cc: Nicholas Mc Guire , David Woodhouse , Fabio Estevam , Marek Vasut , linux-kernel@vger.kernel.org, Huang Shijie , Allen Xu , "linux-mtd@lists.infradead.org" , Ben Hutchings Subject: Re: [PATCH] spi: fsl-quadspi: cleanup wait_for_completion return handling Message-ID: <20150331011041.GN32500@ld-irv-0074> References: <1422789346-16954-1-git-send-email-hofrat@osadl.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, Feb 10, 2015 at 10:00:01PM -0600, Han Xu wrote: > On Sun, Feb 1, 2015 at 5:15 AM, 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 adding a additional appropriately typed variable. > > > > Signed-off-by: Nicholas Mc Guire > > --- > > > > As the returnvalue of wait_for_completion_timeout is logically treated here > > as a boolean (timeout occured or not) it can be wrapped into the if condition > > directly and no additional variable is needed. > > > > This patch was only compile tested with imx_v6_v7_defconfig > > (implies CONFIG_SPI_FSL_QUADSPI=y) > > > > Patch is against 3.19.0-rc6 -next-20150130 In practice, I don't think this should matter, since we're not even close to 2^32 jiffies, but the patch looks fine anyway. Pushed to l2-mtd.git. Thanks! Brian