From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755062AbcBBV2k (ORCPT ); Tue, 2 Feb 2016 16:28:40 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:58384 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753723AbcBBV2g (ORCPT ); Tue, 2 Feb 2016 16:28:36 -0500 X-Sasl-enc: r+eU6vnTXrMLT/v21g/5u3QCxeLjYFe0FluEfU71oi5Q 1454448515 Message-ID: <1454448513.3898.3.camel@cvidal.org> Subject: Re: [PATCH] Staging: fix coding style in rtl8188eu/core From: Colin Vidal To: Joe Perches , Greg Kroah-Hartman , "open list:STAGING SUBSYSTEM" , open list Date: Tue, 02 Feb 2016 22:28:33 +0100 In-Reply-To: <1454447665.7291.40.camel@perches.com> References: <1454446679-17327-1-git-send-email-colin@cvidal.org> <1454447665.7291.40.camel@perches.com> 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 13:14 -0800, Joe Perches wrote: > On Tue, 2016-02-02 at 21:57 +0100, Colin Vidal wrote: > > Set constant on the left of the test, and jump a new line to avoid > > to > > exceed the 80 char length limit. > [] > > diff --git a/drivers/staging/rtl8188eu/core/rtw_iol.c > > b/drivers/staging/rtl8188eu/core/rtw_iol.c > [] > > @@ -22,10 +22,11 @@ > >   > >  bool rtw_IOL_applied(struct adapter  *adapter) > >  { > > - if (1 == adapter->registrypriv.fw_iol) > > + if (adapter->registrypriv.fw_iol == 1) > >   return true; > >   > > - if ((2 == adapter->registrypriv.fw_iol) && > > (!adapter_to_dvobj(adapter)->ishighspeed)) > > + if ((adapter->registrypriv.fw_iol == 2) > > +     && (!adapter_to_dvobj(adapter)->ishighspeed)) > >   return true; > >   return false; > >  } > > Please review your patches with scripts/checkpatch.pl > > Perhaps this is better as: > > bool rtw_IOL_applied(struct adapter *adapter) > { > if (adapter->registrypriv.fw_iol == 1) > return true; > > if (adapter->registrypriv.fw_iol == 2 && >     !adapter_to_dvobj(adapter)->ishighspeed) > return true; > > return false; > } > > or maybe even > > bool rtw_IOL_applied(struct adapter *adapter) > { > return adapter->registrypriv.fw_iol == 1 || >        (adapter->registrypriv.fw_iol == 2 && > !adapter_to_dvobj(adapter)->ishighspeed); > } > Oh, yeah, the second one is obviously finer. If I'm right, I should resend a new patch with a subject which looks something like "[PATCH v2] ... " ?  Thanks