From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750891AbdAaECl (ORCPT ); Mon, 30 Jan 2017 23:02:41 -0500 Received: from smtprelay0152.hostedemail.com ([216.40.44.152]:36998 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750798AbdAaECk (ORCPT ); Mon, 30 Jan 2017 23:02:40 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3868:3872:4321:5007:7514:10004:10400:10848:11026:11232:11473:11658:11914:12043:12294:12438:12555:12740:12760:12895:12986:13069:13161:13229:13311:13357:13439:14096:14097:14181:14659:14721:14877:21080:21451:30045:30046:30054:30090:30091,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:error,Custom_rules:0:0:0,LFtime:2000,LUA_SUMMARY:none X-HE-Tag: can67_22a7fb8a57f16 X-Filterd-Recvd-Size: 2742 Message-ID: <1485835236.20550.20.camel@perches.com> Subject: Re: [PATCH 001] staging: wlan-ng: Add tabstop preceding the statement From: Joe Perches To: Greg Kroah-Hartman , Maksymilian Piechota Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Date: Mon, 30 Jan 2017 20:00:36 -0800 In-Reply-To: <20170130164423.GA12941@kroah.com> References: <20170130163142.GA9425@maks-debian.localdomain> <20170130164423.GA12941@kroah.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-01-30 at 17:44 +0100, Greg Kroah-Hartman wrote: > On Mon, Jan 30, 2017 at 11:31:42AM -0500, Maksymilian Piechota wrote: > > This patch fixes the checkpatch.pl warning: > > > > WARNING: Statements should start on a tabstop > > > > Signed-off-by: Maksymilian Piechota > > --- > > drivers/staging/wlan-ng/prism2mgmt.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c > > index 16fb2d3..2d67125 100644 > > --- a/drivers/staging/wlan-ng/prism2mgmt.c > > +++ b/drivers/staging/wlan-ng/prism2mgmt.c > > @@ -1308,7 +1308,7 @@ int prism2mgmt_wlansniff(struct wlandevice *wlandev, void *msgp) > > hw->sniffhdr = 0; > > wlandev->netdev->type = ARPHRD_IEEE80211_PRISM; > > } else > > - if ((msg->wlanheader.status == > > + if ((msg->wlanheader.status == > > P80211ENUM_msgitem_status_data_ok) > > && (msg->wlanheader.data == P80211ENUM_truth_true)) { > > hw->sniffhdr = 1; > > Hm, this all doesn't look correct now, does it? Please fix up the whole > if statement here. Ideally, it'd look something like: /* Set the driver state */ /* Do we want the prism2 header? */ if (msg->prismheader.status == P80211ENUM_msgitem_status_data_ok && msg->prismheader.data == P80211ENUM_truth_true) { hw->sniffhdr = 0; wlandev->netdev->type = ARPHRD_IEEE80211_PRISM; } else if (msg->wlanheader.status == P80211ENUM_msgitem_status_data_ok && msg->wlanheader.data == P80211ENUM_truth_true) { hw->sniffhdr = 1; wlandev->netdev->type = ARPHRD_IEEE80211_PRISM; } else { wlandev->netdev->type = ARPHRD_IEEE80211; } with the unnecessary parentheses removed, the logical continuations at the end-of-line, and the else if on a single line.