From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754352AbdBUSoI (ORCPT ); Tue, 21 Feb 2017 13:44:08 -0500 Received: from smtprelay0070.hostedemail.com ([216.40.44.70]:47581 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752087AbdBUSmb (ORCPT ); Tue, 21 Feb 2017 13:42:31 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:4321:5007:7903:10004:10400:10471:10848:11026:11232:11473:11658:11783:11914:12740:12895:13069:13161:13229:13255:13311:13357:13439:13894:14181:14659:14721:21060:21080:30012:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: brake12_4dd4ea886423d X-Filterd-Recvd-Size: 1813 Message-ID: <1487702533.2853.23.camel@perches.com> Subject: Re: [Outreachy kernel] [PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors From: Joe Perches To: Julia Lawall , Arushi Singhal Cc: arnaud.patard@rtp-net.org, Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Date: Tue, 21 Feb 2017 10:42:13 -0800 In-Reply-To: References: <20170221171920.GA18917@arushi-HP-Pavilion-Notebook> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.3-0ubuntu0.1 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, 2017-02-21 at 18:40 +0100, Julia Lawall wrote: > > On Tue, 21 Feb 2017, Arushi Singhal wrote: > > > Error was reported by checkpatch.pl as > > WARNING: Avoid multiple line dereference... > > if there is boolean operator then it is fixed by Splitting line at > > boolean operator. > > This is massively execeeding the 80 character boundary, and not for > something trivial like a string. Maybe the code can be reorganized in > some other way. The easiest way to do that is to change the test above it to reduce indentation from if (xgifb_info->display2 == XGIFB_DISP_TV &&     xgifb_info->hasVB == HASVB_301) { [code...]; } } to if (xgifb_info->display2 != XGIFB_DISP_TV ||     xgifb_in fo->hasVB != HASVB_301) return; [code...]; }