Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933134AbbFWM7i (ORCPT ); Tue, 23 Jun 2015 08:59:38 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:35937 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753565AbbFWM7b (ORCPT ); Tue, 23 Jun 2015 08:59:31 -0400 Date: Tue, 23 Jun 2015 15:05:30 +0200 From: Luis de Bethencourt To: Frans Klaver Cc: "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Antoine Schweitzer-Chaput , Cristina Opriceana , Aya Mahfouz , Rickard Strandqvist , Koray Gulcu , Greg Donald , Lorenzo Stoakes , Ebru Akagunduz , Karthik Nayak , devel@driverdev.osuosl.org Subject: Re: [PATCH] staging: rtl8192u: bool tests don't need comparisons Message-ID: <20150623130530.GA1655@goodgumbo.baconseed.org> References: <20150623125224.GA991@goodgumbo.baconseed.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 Content-Length: 1555 Lines: 41 On Tue, Jun 23, 2015 at 02:56:38PM +0200, Frans Klaver wrote: > On Tue, Jun 23, 2015 at 2:52 PM, Luis de Bethencourt > wrote: > > Remove explicit true/false comparations to bool variables. > > > > Signed-off-by: Luis de Bethencourt > > --- > > drivers/staging/rtl8192u/r8192U_core.c | 7 ++++--- > > drivers/staging/rtl8192u/r8192U_dm.c | 21 +++++++++++---------- > > 2 files changed, 15 insertions(+), 13 deletions(-) > > > > diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c > > index a4795af..c53d670 100644 > > --- a/drivers/staging/rtl8192u/r8192U_core.c > > +++ b/drivers/staging/rtl8192u/r8192U_core.c > > @@ -2047,7 +2047,7 @@ static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev) > > struct r8192_priv *priv = ieee80211_priv(dev); > > struct ieee80211_device *ieee = priv->ieee80211; > > > > - if (ieee->bHalfWirelessN24GMode == true) > > + if (ieee->bHalfWirelessN24GMode) > > Reval = true; > > else > > Reval = false; > > With this one I'd go as far as saying that > > Reval = ieee->bHalfWirelessN24GMode; > > Frans Completely missed that. Good catch. Thanks for the review! Sending an updated version now. Luis -- 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/