Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933226AbbFWM5E (ORCPT ); Tue, 23 Jun 2015 08:57:04 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:34392 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933019AbbFWM4k (ORCPT ); Tue, 23 Jun 2015 08:56:40 -0400 MIME-Version: 1.0 In-Reply-To: <20150623125224.GA991@goodgumbo.baconseed.org> References: <20150623125224.GA991@goodgumbo.baconseed.org> Date: Tue, 23 Jun 2015 14:56:38 +0200 Message-ID: Subject: Re: [PATCH] staging: rtl8192u: bool tests don't need comparisons From: Frans Klaver To: Luis de Bethencourt 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1336 Lines: 34 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 -- 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/