X-GM-THRID: 6330466740152041472 X-Received: by 10.28.207.131 with SMTP id f125mr295793wmg.4.1473927932326; Thu, 15 Sep 2016 01:25:32 -0700 (PDT) X-BeenThere: outreachy-kernel@googlegroups.com Received: by 10.28.230.146 with SMTP id e18ls185064wmi.16.canary; Thu, 15 Sep 2016 01:25:31 -0700 (PDT) X-Received: by 10.194.104.230 with SMTP id gh6mr1265533wjb.7.1473927931859; Thu, 15 Sep 2016 01:25:31 -0700 (PDT) Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr. [192.134.164.104]) by gmr-mx.google.com with ESMTPS id b1si112320wmg.0.2016.09.15.01.25.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Sep 2016 01:25:31 -0700 (PDT) Received-SPF: neutral (google.com: 192.134.164.104 is neither permitted nor denied by domain of julia.lawall@lip6.fr) client-ip=192.134.164.104; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.134.164.104 is neither permitted nor denied by domain of julia.lawall@lip6.fr) smtp.mailfrom=julia.lawall@lip6.fr X-IronPort-AV: E=Sophos;i="5.30,338,1470693600"; d="scan'208";a="193507167" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 Sep 2016 10:25:31 +0200 Date: Thu, 15 Sep 2016 10:25:30 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Sandhya Bankar cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org, claudiu.beznea@gmail.com, johannes.berg@intel.com, gavinoleary3@gmail.com, brcnakalin@gmail.com, avraham.stern@intel.com, brutallesale@gmail.com Subject: Re: [Outreachy kernel] [PATCH v2] Staging: wlan-ng: Use !x instead of x == NULL. In-Reply-To: <20160915082251.GA6833@sandhya> Message-ID: References: <20160915082251.GA6833@sandhya> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 15 Sep 2016, Sandhya Bankar wrote: > Use !x instead of x == NULL. > This issue was found by checkpatch. Looks better :) julia > > Signed-off-by: Sandhya Bankar > --- > Changes in v2: > * Correcting the commit message. > drivers/staging/wlan-ng/cfg80211.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c > index a36e40d..884d0d5 100644 > --- a/drivers/staging/wlan-ng/cfg80211.c > +++ b/drivers/staging/wlan-ng/cfg80211.c > @@ -265,7 +265,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, > > memset(sinfo, 0, sizeof(*sinfo)); > > - if ((wlandev == NULL) || (wlandev->msdstate != WLAN_MSD_RUNNING)) > + if (!wlandev || (wlandev->msdstate != WLAN_MSD_RUNNING)) > return -EOPNOTSUPP; > > /* build request message */ > @@ -274,7 +274,7 @@ static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev, > quality.dbm.status = P80211ENUM_msgitem_status_data_ok; > > /* send message to nsd */ > - if (wlandev->mlmerequest == NULL) > + if (!wlandev->mlmerequest) > return -EOPNOTSUPP; > > result = wlandev->mlmerequest(wlandev, (struct p80211msg *)&quality); > -- > 1.8.2.3 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To post to this group, send email to outreachy-kernel@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160915082251.GA6833%40sandhya. > For more options, visit https://groups.google.com/d/optout. >