Re: [PATCH] staging: rtl8723bs: Fix coding style checks and warns

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

 



On Mon, Feb 03, 2025 at 02:23:12PM -0800, Ian To wrote:
> Coding style issues were present in the file. Unnecessary parenthesis,
> missing spaces, and exceeding line limits were the most prominent.

This needs to be split into several patches:

1: add missing spaces
2: delete unnecessary parentheses
3: split up long lines

> -	if ((pmlmepriv->timeBcnInfoChkStart != 0) && (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) > DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)) {
> +	if ((pmlmepriv->timeBcnInfoChkStart != 0) &&
> +	    (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) >
> +	    DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)) {

The DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS should be indented one
more space character.

	if ((pmlmepriv->timeBcnInfoChkStart != 0) &&
	    (jiffies_to_msecs(jiffies - pmlmepriv->timeBcnInfoChkStart) >
	     DISCONNECT_BY_CHK_BCN_FAIL_OBSERV_PERIOD_IN_MS)) {

> @@ -1696,12 +1707,12 @@ void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
>  		/* pmlmeext->bcn_delay_ratio[delay_ms] = (pmlmeext->bcn_delay_cnt[delay_ms] * 100) /pmlmeext->bcn_cnt; */
>  
>  /*
> -
> -	for (i = 0; i<9; i++)
> -	{
> -			pmlmeext->bcn_delay_cnt[i] , i, pmlmeext->bcn_delay_ratio[i]);
> -	}
> -*/
> + *
> + *	for (i = 0; i<9; i++)
> + *	{
> + *			pmlmeext->bcn_delay_cnt[i] , i, pmlmeext->bcn_delay_ratio[i]);
> + *	}
> + */
>  

Just delete this code, don't change the format.

regards,
dan carpenter





[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