Re: [PATCH 3/8] staging:rtl8821ae fix ERROR: space required after that in pci.c

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

 



On Fri, Feb 07, 2014 at 12:45:24AM +0530, Gokulnath A wrote:
> fixed all the spacing related issues found by checkpatch.pl script. 
> 

A lot of this stuff should just be removed.

> Signed-off-by: Gokulnath A <Gokulnath.Avanashilingam@xxxxxxxxxxxx>

The signed off by should match the email you are using to send so we can
verify it a bit.

> ---
>  drivers/staging/rtl8821ae/pci.c | 54 ++++++++++++++++++++---------------------
>  1 file changed, 27 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c
> index a1bf11b..3962634 100644
> --- a/drivers/staging/rtl8821ae/pci.c
> +++ b/drivers/staging/rtl8821ae/pci.c
> @@ -33,7 +33,7 @@
>  #include "base.h"
>  #include "ps.h"
>  #include "efuse.h"
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0))

We don't care about compatability with older kernels.  This #if is
always true.

>  #include <linux/export.h>
>  #endif
>  
> @@ -365,7 +365,7 @@ static bool rtl_pci_get_amd_l1_patch(struct ieee80211_hw *hw)
>  }
>  
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35))

This #if is always false.

>  static u8 _rtl_pci_get_pciehdr_offset(struct ieee80211_hw *hw)
>  {
>  	u8 capability_offset;
> @@ -611,7 +611,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
>  							       &tcb_desc, tid);
>  
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))

This #if is always false.

>  			rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
>  #else
>  /*<delete in kernel end>*/
> @@ -1016,7 +1016,7 @@ static irqreturn_t _rtl_pci_interrupt(int irq, void *dev_id)
>  	if (rtlpci->irq_enabled == 0)
>  		return IRQ_HANDLED;
>  
> -	spin_lock_irqsave(&rtlpriv->locks.irq_th_lock,flags);
> +	spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
>  
>  
>  	rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[MAC_HIMR], 0x0);
> @@ -1202,7 +1202,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
>  		pbuffer_desc = &ring->buffer_desc[0];
>  
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))

Always false.

>  	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
>  				        (u8 *)pbuffer_desc, info, pskb,
>  				        BEACON_QUEUE, &tcb_desc);
> @@ -1617,7 +1617,7 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
>  }
>  
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))

Always false.

>  static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
>  					struct sk_buff *skb)
>  #else
> @@ -1631,7 +1631,7 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
>  {
>  	struct rtl_priv *rtlpriv = rtl_priv(hw);
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))

Always false.

>  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
>  	struct ieee80211_sta *sta = info->control.sta;
>  #endif
> @@ -1672,7 +1672,7 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
>  }
>  
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))

false.

>  int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
>  	       struct rtl_tcb_desc *ptcb_desc)
>  #else
> @@ -1689,7 +1689,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
>  	struct rtl_sta_info *sta_entry = NULL;
>  	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))

false

>  	struct ieee80211_sta *sta = info->control.sta;
>  #endif
>  /*<delete in kernel end>*/
> @@ -1778,7 +1778,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
>  		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
>  
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
> +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 7, 0))


false

>  	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
>  					(u8 *)ptx_bd_desc, info, skb,
>  					hw_queue, ptcb_desc);
> @@ -1819,7 +1819,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw,
>  
>  	return 0;
>  }
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))

true

>  static void rtl_pci_flush(struct ieee80211_hw *hw, u32 queues, bool drop)
>  #else
>  static void rtl_pci_flush(struct ieee80211_hw *hw, bool drop)
> @@ -1838,7 +1838,7 @@ static void rtl_pci_flush(struct ieee80211_hw *hw, bool drop)
>  
>  	for (queue_id = RTL_PCI_MAX_TX_QUEUE_COUNT - 1; queue_id >= 0;) {
>  		u32 queue_len;
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0))\


true

>  		if (((queues >> queue_id) & 0x1) == 0) {
>  			queue_id--;
>  			continue;
> @@ -1908,7 +1908,7 @@ int rtl_pci_start(struct ieee80211_hw *hw)
>  	err = rtlpriv->cfg->ops->hw_init(hw);
>  	if (err) {
>  		RT_TRACE(COMP_INIT, DBG_DMESG,
> -			 ("Failed to config hardware err %x!\n",err));
> +			 ("Failed to config hardware err %x!\n", err));
>  		return err;
>  	}
>  
> @@ -2016,7 +2016,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
>  			break;
>  
>  		}
> -	}else if(deviceid == RTL_PCI_8723AE_DID) {
> +	} else if(deviceid == RTL_PCI_8723AE_DID) {
               ^^^
Put a space here as well.  "if (".

>  		rtlhal->hw_type = HARDWARE_TYPE_RTL8723AE;
>  		RT_TRACE(COMP_INIT, DBG_DMESG,
>  			 ("8723AE PCI-E is found - "
> @@ -2035,27 +2035,27 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
>  		RT_TRACE(COMP_INIT, DBG_DMESG,
>  			 ("8192D PCI-E is found - "
>  			  "vid/did=%x/%x\n", venderid, deviceid));
> -	}else if(deviceid == RTL_PCI_8188EE_DID){
> +	} else if(deviceid == RTL_PCI_8188EE_DID){

Space after the if.

>  			rtlhal->hw_type = HARDWARE_TYPE_RTL8188EE;
> -			RT_TRACE(COMP_INIT,DBG_LOUD,
> +			RT_TRACE(COMP_INIT, DBG_LOUD,
>  				 ("Find adapter, Hardware type is 8188EE\n"));
> -	}else if (deviceid == RTL_PCI_8723BE_DID){
> +	} else if (deviceid == RTL_PCI_8723BE_DID){\

Space in front of the open curly brace.

>  			rtlhal->hw_type = HARDWARE_TYPE_RTL8723BE;
> -			RT_TRACE(COMP_INIT,DBG_LOUD,
> +			RT_TRACE(COMP_INIT, DBG_LOUD,
>  				 ("Find adapter, Hardware type is 8723BE\n"));
> -	}else if (deviceid == RTL_PCI_8192EE_DID){
> +	} else if (deviceid == RTL_PCI_8192EE_DID){

before open curly

>  			rtlhal->hw_type = HARDWARE_TYPE_RTL8192EE;
> -			RT_TRACE(COMP_INIT,DBG_LOUD,
> +			RT_TRACE(COMP_INIT, DBG_LOUD,
>  				 ("Find adapter, Hardware type is 8192EE\n"));
> -	}else if (deviceid == RTL_PCI_8821AE_DID) {
> +	} else if (deviceid == RTL_PCI_8821AE_DID) {
>  			rtlhal->hw_type = HARDWARE_TYPE_RTL8821AE;
> -			RT_TRACE(COMP_INIT,DBG_LOUD,
> +			RT_TRACE(COMP_INIT, DBG_LOUD,
>  				("Find adapter, Hardware type is 8821AE\n"));
> -	}else if (deviceid == RTL_PCI_8812AE_DID) {
> +	} else if (deviceid == RTL_PCI_8812AE_DID) {
>  			rtlhal->hw_type = HARDWARE_TYPE_RTL8812AE;
> -			RT_TRACE(COMP_INIT,DBG_LOUD,
> +			RT_TRACE(COMP_INIT, DBG_LOUD,
>  				("Find adapter, Hardware type is 8812AE\n"));
> -	}else {
> +	} else {
>  		RT_TRACE(COMP_ERR, DBG_WARNING,
>  			 ("Err: Unknown device -"
>  			  " vid/did=%x/%x\n", venderid, deviceid));
> @@ -2123,7 +2123,7 @@ static bool _rtl_pci_find_adapter(struct pci_dev *pdev,
>  		    (pcipriv->ndis_adapter.pcibridge_devnum << 11) |
>  		    (pcipriv->ndis_adapter.pcibridge_funcnum << 8) | (1 << 31);
>  /*<delete in kernel start>*/
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35))

always true.

>  /*<delete in kernel end>*/
>  		pcipriv->ndis_adapter.pcibridge_pciehdr_offset =
>  		    pci_pcie_cap(bridge_pdev);
> @@ -2230,7 +2230,7 @@ static int rtl_pci_intr_mode_decide(struct ieee80211_hw *hw)
>   * hw pointer in rtl_pci_get_hw_pointer */
>  struct ieee80211_hw *hw_export = NULL;
>  
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0))

always true

>  int rtl_pci_probe(struct pci_dev *pdev,
>                    const struct pci_device_id *id)
>  
> -- 
> 1.8.1.2
> 
> _______________________________________________
> devel mailing list
> devel@xxxxxxxxxxxxxxxxxxxxxx
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
_______________________________________________
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