Re: [Outreachy kernel] Re: [PATCH v7] staging: xgifb: correct the multiple line dereference

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

 



On Tue, 2017-02-28 at 12:24 +0100, Julia Lawall wrote:
> It's drifting a little bit from the original issue, but the whole *i thing
> is not very nice.  The function is used in only one place, and the call
> looks like this:
> 
>                temp = XGI_AjustCRT2Rate(ModeIdIndex, RefreshRateTableIndex,
> 	                                 &i, pVBInfo);
> 
> immediately followed by:
> 
> return RefreshRateTableIndex + i;
> 
> temp is never used.  Could the function be made to return a negative error
> code on failure and the updated value of i on success?  The (*i) could
> become just i, which would even be a little shorter.

I don't see why not.
_______________________________________________
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