[Outreachy kernel] [PATCH] staging: xgifb: correct the multiple line dereference to fix coding stye errors

Joe Perches joe at perches.com
Tue Feb 21 18:42:13 UTC 2017


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...];
}



More information about the devel mailing list