Linux kernel staging patches
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Artur Ugnivenko <artur.ugnivenko@gmx.de>
Cc: ahmet@sezginduran.net, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH v2] staging: rtl8723bs: clean up style in hal/sdio_halinit.c
Date: Mon, 18 May 2026 07:13:36 +0200	[thread overview]
Message-ID: <2026051819-twiddle-broadcast-5aa7@gregkh> (raw)
In-Reply-To: <20260517210237.27136-1-artur.ugnivenko@gmx.de>

On Sun, May 17, 2026 at 11:02:37PM +0200, Artur Ugnivenko wrote:
> Fix checkpatch style warnings in hal/sdio_halinit.c:
> - excessive empty lines
> - inconsistent braces in if/else statements
> - long lines (very long function calls)
> 
> Signed-off-by: Artur Ugnivenko <artur.ugnivenko@gmx.de>
> ---
> Changes in v2: make the patch apply to gregkh/staging-testing
> 
>  drivers/staging/rtl8723bs/hal/sdio_halinit.c | 133 +++++++++++--------
>  1 file changed, 78 insertions(+), 55 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> index 1e0498268aee..27c5d23662e4 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> @@ -21,20 +21,24 @@ static u8 CardEnable(struct adapter *padapter)
>  	u8 bMacPwrCtrlOn;
>  	u8 ret = _FAIL;
>  
> -
>  	rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
>  	if (!bMacPwrCtrlOn) {
>  		/*  RSV_CTRL 0x1C[7:0] = 0x00 */
>  		/*  unlock ISO/CLK/Power control register */
>  		rtw_write8(padapter, REG_RSV_CTRL, 0x0);
>  
> -		ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_enable_flow);
> +		ret = HalPwrSeqCmdParsing(padapter,
> +					  PWR_CUT_ALL_MSK,
> +					  PWR_FAB_ALL_MSK,
> +					  PWR_INTF_SDIO_MSK,
> +					  rtl8723B_card_enable_flow);
>  		if (ret == _SUCCESS) {
>  			bMacPwrCtrlOn = true;
>  			rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
>  		}
> -	} else
> +	} else {
>  		ret = _SUCCESS;
> +	}
>  
>  	return ret;
>  }
> @@ -70,7 +74,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
>  	rtw_write8(padapter, REG_CR, 0x00);
>  	/*  Enable MAC DMA/WMAC/SCHEDULE/SEC block */
>  	value16 = rtw_read16(padapter, REG_CR);
> -	value16 |= (
> +	value16 |=
>  		HCI_TXDMA_EN |
>  		HCI_RXDMA_EN |
>  		TXDMA_EN |
> @@ -78,8 +82,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
>  		PROTOCOL_EN |
>  		SCHEDULE_EN |
>  		ENSEC |
> -		CALTMR_EN
> -	);
> +		CALTMR_EN;
>  	rtw_write16(padapter, REG_CR, value16);
>  
>  	hal_btcoex_PowerOnSetting(padapter);
> @@ -105,7 +108,11 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
>  }
>  
>  /* Tx Page FIFO threshold */
> -static void _init_available_page_threshold(struct adapter *padapter, u8 numHQ, u8 numNQ, u8 numLQ, u8 numPubQ)
> +static void _init_available_page_threshold(struct adapter *padapter,
> +					   u8 numHQ,
> +					   u8 numNQ,
> +					   u8 numLQ,
> +					   u8 numPubQ)
>  {
>  	u16 HQ_threshold, NQ_threshold, LQ_threshold;
>  
> @@ -180,15 +187,13 @@ static void _InitTxBufferBoundary(struct adapter *padapter)
>  	rtw_write8(padapter, REG_TDECTRL + 1, txpktbuf_bndy);
>  }
>  
> -static void _InitNormalChipRegPriority(
> -	struct adapter *Adapter,
> -	u16 beQ,
> -	u16 bkQ,
> -	u16 viQ,
> -	u16 voQ,
> -	u16 mgtQ,
> -	u16 hiQ
> -)
> +static void _InitNormalChipRegPriority(struct adapter *Adapter,
> +				       u16 beQ,
> +				       u16 bkQ,
> +				       u16 viQ,
> +				       u16 voQ,
> +				       u16 mgtQ,
> +				       u16 hiQ)
>  {
>  	u16 value16 = (rtw_read16(Adapter, REG_TRXDMA_CTRL) & 0x7);
>  
> @@ -223,10 +228,13 @@ static void _InitNormalChipOneOutEpPriority(struct adapter *Adapter)
>  		break;
>  	}
>  
> -	_InitNormalChipRegPriority(
> -		Adapter, value, value, value, value, value, value
> -	);
> -
> +	_InitNormalChipRegPriority(Adapter,
> +				   value,
> +				   value,
> +				   value,
> +				   value,
> +				   value,
> +				   value);
>  }
>  
>  static void _InitNormalChipTwoOutEpPriority(struct adapter *Adapter)
> @@ -235,7 +243,6 @@ static void _InitNormalChipTwoOutEpPriority(struct adapter *Adapter)
>  	struct registry_priv *pregistrypriv = &Adapter->registrypriv;
>  	u16 beQ, bkQ, viQ, voQ, mgtQ, hiQ;
>  
> -
>  	u16 valueHi = 0;
>  	u16 valueLow = 0;
>  
> @@ -274,7 +281,6 @@ static void _InitNormalChipTwoOutEpPriority(struct adapter *Adapter)
>  	}
>  
>  	_InitNormalChipRegPriority(Adapter, beQ, bkQ, viQ, voQ, mgtQ, hiQ);
> -
>  }
>  
>  static void _InitNormalChipThreeOutEpPriority(struct adapter *padapter)
> @@ -319,8 +325,6 @@ static void _InitQueuePriority(struct adapter *Adapter)
>  	default:
>  		break;
>  	}
> -
> -
>  }
>  
>  static void _InitPageBoundary(struct adapter *padapter)
> @@ -363,7 +367,6 @@ static void _InitWMACSetting(struct adapter *padapter)
>  	struct hal_com_data *pHalData;
>  	u16 value16;
>  
> -
>  	pHalData = GET_HAL_DATA(padapter);
>  
>  	pHalData->ReceiveConfig = 0;
> @@ -517,7 +520,6 @@ static void _InitOperationMode(struct adapter *padapter)
>  	}
>  
>  	rtw_write8(padapter, REG_BWOPMODE, regBwOpMode);
> -
>  }
>  
>  static void _InitInterrupt(struct adapter *padapter)
> @@ -560,7 +562,6 @@ static bool HalDetectPwrDownMode(struct adapter *Adapter)
>  	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
>  	struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(Adapter);
>  
> -
>  	rtw_efuse_shadow_read(Adapter, 1, 0x7B/*EEPROM_RF_OPT3_92C*/, (u32 *)&tmpvalue);
>  
>  	/*  2010/08/25 MH INF priority > PDN Efuse value. */
> @@ -604,7 +605,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
>  		/* do polling cpwm */
>  		start_time = jiffies;
>  		do {
> -
>  			mdelay(1);
>  
>  			rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
> @@ -720,8 +720,11 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
>  
>  	invalidate_cam_all(padapter);
>  
> -	rtw_hal_set_chnl_bw(padapter, padapter->registrypriv.channel,
> -		CHANNEL_WIDTH_20, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HAL_PRIME_CHNL_OFFSET_DONT_CARE);
> +	rtw_hal_set_chnl_bw(padapter,
> +			    padapter->registrypriv.channel,
> +			    CHANNEL_WIDTH_20,
> +			    HAL_PRIME_CHNL_OFFSET_DONT_CARE,
> +			    HAL_PRIME_CHNL_OFFSET_DONT_CARE);
>  
>  	rtl8723b_InitAntenna_Selection(padapter);
>  
> @@ -735,7 +738,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
>  	/*  set 0x0 to 0xFF by tynli. Default enable HW SEQ NUM. */
>  	rtw_write8(padapter, REG_HWSEQ_CTRL, 0xFF);
>  
> -
>  	/*  */
>  	/*  Configure SDIO TxRx Control to enable Rx DMA timer masking. */
>  	/*  2010.02.24. */
> @@ -744,7 +746,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
>  
>  	_RfPowerSave(padapter);
>  
> -
>  	rtl8723b_InitHalDm(padapter);
>  
>  	/*  */
> @@ -794,7 +795,11 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
>  
>  			restore_iqk_rst = pwrpriv->bips_processing;
>  			b2Ant = pHalData->EEPROMBluetoothAntNum == Ant_x2;
> -			PHY_IQCalibrate_8723B(padapter, false, restore_iqk_rst, b2Ant, pHalData->ant_path);
> +			PHY_IQCalibrate_8723B(padapter,
> +					      false,
> +					      restore_iqk_rst,
> +					      b2Ant,
> +					      pHalData->ant_path);
>  			pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = true;
>  
>  			hal_btcoex_IQKNotify(padapter, false);
> @@ -825,7 +830,11 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
>  	u8 bMacPwrCtrlOn;
>  
>  	/*  Run LPS WL RFOFF flow */
> -	HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> +	HalPwrSeqCmdParsing(padapter,
> +			    PWR_CUT_ALL_MSK,
> +			    PWR_FAB_ALL_MSK,
> +			    PWR_INTF_SDIO_MSK,
> +			    rtl8723B_enter_lps_flow);
>  
>  	/*	==== Reset digital sequence   ====== */
>  
> @@ -854,7 +863,11 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
>  
>  	bMacPwrCtrlOn = false;	/*  Disable CMD53 R/W */
>  	rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
> -	HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> +	HalPwrSeqCmdParsing(padapter,
> +			    PWR_CUT_ALL_MSK,
> +			    PWR_FAB_ALL_MSK,
> +			    PWR_INTF_SDIO_MSK,
> +			    rtl8723B_card_disable_flow);
>  }
>  
>  u32 rtl8723bs_hal_deinit(struct adapter *padapter)
> @@ -866,7 +879,10 @@ u32 rtl8723bs_hal_deinit(struct adapter *padapter)
>  				u8 val8 = 0;
>  
>  				rtl8723b_set_FwPwrModeInIPS_cmd(padapter, 0x3);
> -				/* poll 0x1cc to make sure H2C command already finished by FW; MAC_0x1cc = 0 means H2C done by FW. */
> +				/*
> +				 * poll 0x1cc to make sure H2C command already finished by FW;
> +				 * MAC_0x1cc = 0 means H2C done by FW.
> +				 */
>  				do {
>  					val8 = rtw_read8(padapter, REG_HMETFR);
>  					cnt++;
> @@ -875,12 +891,16 @@ u32 rtl8723bs_hal_deinit(struct adapter *padapter)
>  				/* H2C done, enter 32k */
>  				if (val8 == 0) {
>  					/* set rpwm to enter 32k */
> -					val8 = rtw_read8(padapter, SDIO_LOCAL_BASE | SDIO_REG_HRPWM1);
> +					val8 = rtw_read8(padapter,
> +							 SDIO_LOCAL_BASE | SDIO_REG_HRPWM1);
>  					val8 += 0x80;
>  					val8 |= BIT(0);
> -					rtw_write8(padapter, SDIO_LOCAL_BASE | SDIO_REG_HRPWM1, val8);
> +					rtw_write8(padapter,
> +						   SDIO_LOCAL_BASE | SDIO_REG_HRPWM1,
> +						   val8);
>  					adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
> -					cnt = val8 = 0;
> +					cnt = 0;
> +					val8 = 0;
>  					do {
>  						val8 = rtw_read8(padapter, REG_CR);
>  						cnt++;
> @@ -908,7 +928,6 @@ void rtl8723bs_init_default_value(struct adapter *padapter)
>  {
>  	struct hal_com_data *pHalData;
>  
> -
>  	pHalData = GET_HAL_DATA(padapter);
>  
>  	rtl8723b_init_default_value(padapter);
> @@ -924,7 +943,6 @@ void rtl8723bs_interface_configure(struct adapter *padapter)
>  	struct registry_priv *pregistrypriv = &padapter->registrypriv;
>  	bool bWiFiConfig = pregistrypriv->wifi_spec;
>  
> -
>  	pdvobjpriv->RtOutPipe[0] = WLAN_TX_HIQ_DEVICE_ID;
>  	pdvobjpriv->RtOutPipe[1] = WLAN_TX_MIQ_DEVICE_ID;
>  	pdvobjpriv->RtOutPipe[2] = WLAN_TX_LOQ_DEVICE_ID;
> @@ -976,10 +994,9 @@ static void _ReadRFType(struct adapter *Adapter)
>  	pHalData->rf_chip = RF_6052;
>  }
>  
> -
> -static void Hal_EfuseParseMACAddr_8723BS(
> -	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
> -)
> +static void Hal_EfuseParseMACAddr_8723BS(struct adapter *padapter,
> +					 u8 *hwinfo,
> +					 bool AutoLoadFail)
>  {
>  	struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
>  
> @@ -991,9 +1008,9 @@ static void Hal_EfuseParseMACAddr_8723BS(
>  	}
>  }
>  
> -static void Hal_EfuseParseBoardType_8723BS(
> -	struct adapter *padapter, u8 *hwinfo, bool AutoLoadFail
> -)
> +static void Hal_EfuseParseBoardType_8723BS(struct adapter *padapter,
> +					   u8 *hwinfo,
> +					   bool AutoLoadFail)
>  {
>  	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
>  
> @@ -1001,8 +1018,9 @@ static void Hal_EfuseParseBoardType_8723BS(
>  		pHalData->BoardType = (hwinfo[EEPROM_RF_BOARD_OPTION_8723B] & 0xE0) >> 5;
>  		if (pHalData->BoardType == 0xFF)
>  			pHalData->BoardType = (EEPROM_DEFAULT_BOARD_OPTION & 0xE0) >> 5;
> -	} else
> +	} else {
>  		pHalData->BoardType = 0;
> +	}
>  }
>  
>  static void _ReadEfuseInfo8723BS(struct adapter *padapter)
> @@ -1070,7 +1088,6 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
>  	if (!padapter->hw_init_completed)
>  		_InitPowerOn_8723BS(padapter);
>  
> -
>  	val8 = rtw_read8(padapter, 0x4e);
>  	val8 |= BIT(6);
>  	rtw_write8(padapter, 0x4e, val8);
> @@ -1080,8 +1097,14 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
>  	_ReadPROMContent(padapter);
>  
>  	if (!padapter->hw_init_completed) {
> -		rtw_write8(padapter, 0x67, 0x00); /*  for BT, Switch Ant control to BT */
> -		CardDisableRTL8723BSdio(padapter);/* for the power consumption issue,  wifi ko module is loaded during booting, but wifi GUI is off */
> +		/* for BT, Switch Ant control to BT */
> +		rtw_write8(padapter, 0x67, 0x00);
> +
> +		/*
> +		 * for the power consumption issue, wifi ko module is loaded
> +		 * during booting, but wifi GUI is off
> +		 */
> +		CardDisableRTL8723BSdio(padapter);
>  	}
>  
>  	return _SUCCESS;
> @@ -1175,9 +1198,9 @@ void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf, int l
>  /*	Description: */
>  /*		Query setting of specified variable. */
>  /*  */
> -u8 GetHalDefVar8723BSDIO(
> -	struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue
> -)
> +u8 GetHalDefVar8723BSDIO(struct adapter *Adapter,
> +			 enum hal_def_variable eVariable,
> +			 void *pValue)
>  {
>  	u8 bResult = _SUCCESS;
>  
> -- 
> 2.54.0
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did many different things all at once, making it difficult
  to review.  All Linux kernel patches need to only do one thing at a
  time.  If you need to do multiple things (such as clean up all coding
  style issues in a file/driver), do it in a sequence of patches, each
  one doing only one thing.  This will make it easier to review the
  patches to ensure that they are correct, and to help alleviate any
  merge issues that larger patches can cause.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

  reply	other threads:[~2026-05-18  5:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-17 19:46 [PATCH] staging: rtl8723bs: clean up style in hal/sdio_halinit.c Artur Ugnivenko
2026-05-17 19:57 ` Ahmet Sezgin Duran
2026-05-17 21:02   ` [PATCH v2] " Artur Ugnivenko
2026-05-18  5:13     ` Greg KH [this message]
2026-05-18  5:37     ` Dan Carpenter
2026-05-18 11:12       ` [PATCH v3 0/4] staging: rtl8723bs: fix several style issues " Artur Ugnivenko
2026-05-18 11:12         ` [PATCH v3 1/4] staging: rtl8723bs: shorten long lines " Artur Ugnivenko
2026-05-18 11:12         ` [PATCH v3 2/4] staging: rtl8723bs: fix inconsistent braces " Artur Ugnivenko
2026-05-18 11:16           ` Dan Carpenter
2026-05-18 12:25             ` [PATCH v4 0/4] staging: rtl8723bs: fix several style issues " Artur Ugnivenko
2026-05-18 12:25               ` [PATCH v4 1/4] staging: rtl8723bs: shorten long lines " Artur Ugnivenko
2026-05-18 12:25               ` [PATCH v4 2/4] staging: rtl8723bs: fix inconsistent braces " Artur Ugnivenko
2026-05-18 15:07               ` [PATCH v4 3/4] staging: rtl8723bs: remove excessive whitespace " Artur Ugnivenko
2026-05-18 15:07                 ` [PATCH v4 4/4] staging: rtl8723bs: fix lines ending in parentheses " Artur Ugnivenko
2026-05-21  8:36               ` [PATCH v4 0/4] staging: rtl8723bs: fix several style issues " Greg KH
2026-05-18 11:12         ` [PATCH v3 3/4] staging: rtl8723bs: remove excessive whitespace " Artur Ugnivenko
2026-05-18 12:13         ` [PATCH v3 4/4] staging: rtl8723bs: fix lines ending in parentheses " Artur Ugnivenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026051819-twiddle-broadcast-5aa7@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=ahmet@sezginduran.net \
    --cc=artur.ugnivenko@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox