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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux