Re: [PATCH] staging: drivers: rtl8712: removing unnecessary parenthesis

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

 



On Fri, Aug 09, 2019 at 11:18:23PM -0400, Hugo Eduardo Ziviani wrote:
> Fix checkpatch error "CHECK: Remove unecessary parenthesis in drivers/staging/rtl8712/rtl871x_mlme.c"
> 
> Signed-off-by: Hugo Eduardo Ziviani <hugoziviani@xxxxxxxxx>
> ---
>  drivers/staging/rtl8712/rtl871x_mlme.c | 89 +++++++++++++-------------
>  1 file changed, 44 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
> index b34f9919cd93..cddb24242ace 100644
> --- a/drivers/staging/rtl8712/rtl871x_mlme.c
> +++ b/drivers/staging/rtl8712/rtl871x_mlme.c
> @@ -45,9 +45,9 @@ int r8712_init_mlme_priv(struct _adapter *padapter)
>  	/* Maybe someday we should rename this variable to "active_mode"(Jeff)*/
>  	pmlmepriv->passive_mode = 1; /* 1: active, 0: passive. */
>  	spin_lock_init(&pmlmepriv->lock);
> -	spin_lock_init(&(pmlmepriv->lock2));
> -	_init_queue(&(pmlmepriv->free_bss_pool));
> -	_init_queue(&(pmlmepriv->scanned_queue));
> +	spin_lock_init(&pmlmepriv->lock2);
> +	_init_queue(&pmlmepriv->free_bss_pool);
> +	_init_queue(&pmlmepriv->scanned_queue);
>  	set_scanned_network_val(pmlmepriv, 0);
>  	memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
>  	pbuf = kmalloc_array(MAX_BSS_CNT, sizeof(struct wlan_network),
> @@ -57,9 +57,9 @@ int r8712_init_mlme_priv(struct _adapter *padapter)
>  	pmlmepriv->free_bss_buf = pbuf;
>  	pnetwork = (struct wlan_network *)pbuf;
>  	for (i = 0; i < MAX_BSS_CNT; i++) {
> -		INIT_LIST_HEAD(&(pnetwork->list));
> -		list_add_tail(&(pnetwork->list),
> -				 &(pmlmepriv->free_bss_pool.queue));
> +		INIT_LIST_HEAD(&pnetwork->list);
> +		list_add_tail(&pnetwork->list,
> +				&pmlmepriv->free_bss_pool.queue);
>  		pnetwork++;
>  	}
>  	pmlmepriv->sitesurveyctrl.last_rx_pkts = 0;
> @@ -93,7 +93,7 @@ static void _free_network(struct mlme_priv *pmlmepriv,
>  {
>  	u32 curr_time, delta_time;
>  	unsigned long irqL;
> -	struct  __queue *free_queue = &(pmlmepriv->free_bss_pool);
> +	struct  __queue *free_queue = &pmlmepriv->free_bss_pool;
>  
>  	if (!pnetwork)
>  		return;
> @@ -220,8 +220,8 @@ int r8712_is_same_ibss(struct _adapter *adapter, struct wlan_network *pnetwork)
>  	int ret = true;
>  	struct security_priv *psecuritypriv = &adapter->securitypriv;
>  
> -	if ((psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_) &&
> -		    (pnetwork->network.Privacy == cpu_to_le32(0)))
> +	if (psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_ &&
> +	    pnetwork->network.Privacy == cpu_to_le32(0))
>  		ret = false;
>  	else if ((psecuritypriv->PrivacyAlgrthm == _NO_PRIVACY_) &&
>  		 (pnetwork->network.Privacy == cpu_to_le32(1)))
> @@ -286,7 +286,7 @@ static void update_network(struct wlan_bssid_ex *dst,
>  	struct smooth_rssi_data *sqd = &padapter->recvpriv.signal_qual_data;
>  
>  	if (check_fwstate(&padapter->mlmepriv, _FW_LINKED) &&
> -	    is_same_network(&(padapter->mlmepriv.cur_network.network), src)) {
> +	    is_same_network(&padapter->mlmepriv.cur_network.network, src)) {
>  		if (padapter->recvpriv.signal_qual_data.total_num++ >=
>  		    PHY_LINKQUALITY_SLID_WIN_MAX) {
>  			padapter->recvpriv.signal_qual_data.total_num =
> @@ -318,8 +318,8 @@ static void update_current_network(struct _adapter *adapter,
>  {
>  	struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
>  
> -	if (is_same_network(&(pmlmepriv->cur_network.network), pnetwork)) {
> -		update_network(&(pmlmepriv->cur_network.network),
> +	if (is_same_network(&pmlmepriv->cur_network.network, pnetwork)) {
> +		update_network(&pmlmepriv->cur_network.network,
>  			       pnetwork, adapter);
>  		r8712_update_protection(adapter,
>  			       (pmlmepriv->cur_network.network.IEs) +
> @@ -428,8 +428,8 @@ static int is_desired_network(struct _adapter *adapter,
>  			return true;
>  		return false;
>  	}
> -	if ((psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_) &&
> -		    (pnetwork->network.Privacy == 0))
> +	if (psecuritypriv->PrivacyAlgrthm != _NO_PRIVACY_ &&
> +	    pnetwork->network.Privacy == 0)
>  		bselected = false;
>  	if (check_fwstate(&adapter->mlmepriv, WIFI_ADHOC_STATE)) {
>  		if (pnetwork->network.InfrastructureMode !=
> @@ -486,7 +486,7 @@ void r8712_survey_event_callback(struct _adapter *adapter, u8 *pbuf)
>  	spin_lock_irqsave(&pmlmepriv->lock2, flags);
>  	/* update IBSS_network 's timestamp */
>  	if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
> -		if (!memcmp(&(pmlmepriv->cur_network.network.MacAddress),
> +		if (!memcmp(&pmlmepriv->cur_network.network.MacAddress,
>  		    pnetwork->MacAddress, ETH_ALEN)) {
>  			struct wlan_network *ibss_wlan = NULL;
>  
> @@ -539,7 +539,7 @@ void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf)
>  						  msecs_to_jiffies(MAX_JOIN_TIMEOUT));
>  				} else {
>  					struct wlan_bssid_ex *pdev_network =
> -					  &(adapter->registrypriv.dev_network);
> +					&adapter->registrypriv.dev_network;
>  					u8 *pibss =
>  						 adapter->registrypriv.
>  							dev_network.MacAddress;
> @@ -600,11 +600,10 @@ void r8712_free_assoc_resources(struct _adapter *adapter)
>  	if (pwlan)
>  		pwlan->fixed = false;
>  
> -	if (((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) &&
> -	     (adapter->stapriv.asoc_sta_count == 1)))
> +	if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)
> +	    && adapter->stapriv.asoc_sta_count == 1)
>  		free_network_nolock(pmlmepriv, pwlan);
>  }
> -
>  /*
>   * r8712_indicate_connect: the caller has to lock pmlmepriv->lock
>   */

That last change there is not a () "fix", nor should that change have
been made.

Please fix your patch up and resend.

thanks,

greg k-h
_______________________________________________
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