Re: Request for assistance

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

 



On Thu, Oct 20, 2022 at 11:00:59AM +0000, Ubuntu wrote:
> Hello,
> I have a diffictly deciding where exactly to split a long line of code. for example, this line of code is too long
> 
> uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate);
> 
> if i spit it this way:
> uCTSTime =
>         bb_get_frame_time(pDevice->preamble_type, byPktType, 14, pDevice->byTopCCKBasicRate);
> 
> It does not help as the second line is still too long. I considered doing it this way instead:
> uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
>                                 pDevice->byTopCCKBasicRate);
> But i did this on one of my patches and i was told it is not advisable to split a line between
> parenthesis '(' and ')'

Who told you that?

You are close, the code should look like:
	uCTSTime = bb_get_frame_time(pDevice->preamble_type, byPktType, 14,
				     pDevice->byTopCCKBasicRate);

Like millions of other lines in the kernel source tree.  When in doubt,
look at existing implementations.

hope this helps,

greg k-h




[Index of Archives]     [Linux Driver Development]     [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