From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753880AbcBBXET (ORCPT ); Tue, 2 Feb 2016 18:04:19 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:36519 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbcBBXES (ORCPT ); Tue, 2 Feb 2016 18:04:18 -0500 X-Sasl-enc: 5KXkDCH5M6qHOiuE3o9//kBlfbwO3Jhte8A6UOtUQ4X8 1454454256 Message-ID: <1454454255.2671.0.camel@cvidal.org> Subject: Re: [PATCH] Staging: fix coding style in rtl8188eu/core From: Colin Vidal To: Greg Kroah-Hartman , "open list:STAGING SUBSYSTEM" , open list Date: Wed, 03 Feb 2016 00:04:15 +0100 In-Reply-To: <1454453696-10535-1-git-send-email-colin@cvidal.org> References: <1454453696-10535-1-git-send-email-colin@cvidal.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-02-02 at 23:54 +0100, Colin Vidal wrote: > Set constant operand on right of test, and refactor the code in a > more > compact and readable way. > > Signed-off-by: Colin Vidal > --- >  drivers/staging/rtl8188eu/core/rtw_iol.c | 13 +++++-------- >  1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c > b/drivers/staging/rtl8188eu/core/rtw_iol.c > index cdcf0ea..00e1136 100644 > --- a/drivers/staging/rtl8188eu/core/rtw_iol.c > +++ b/drivers/staging/rtl8188eu/core/rtw_iol.c > @@ -18,14 +18,11 @@ >   * >   > ********************************************************************* > *********/ >   > -#include > +#include >   > -bool rtw_IOL_applied(struct adapter  *adapter) > +bool rtw_IOL_applied(struct adapter *adapter) >  { > - if (1 == adapter->registrypriv.fw_iol) > - return true; > - > - if ((2 == adapter->registrypriv.fw_iol) && > (!adapter_to_dvobj(adapter)->ishighspeed)) > - return true; > - return false; > + return adapter->registrypriv.fw_iol == 1 || > + (adapter->registrypriv.fw_iol == 2 && > +  !adapter_to_dvobj(adapter)->ishighspeed); >  } Argh... The subject should be prefixed by "[PATCH v2]"... Missing training, sorry.