Re: [PATCH] staging: rtl8192e: Remove space after cast

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

 



On Tue, Apr 19, 2022 at 08:43:19PM +0800, Solomon Tan wrote:
> This patch addresses the checkpatch.pl flag that there should not be a
> space after a cast.
> 
> Signed-off-by: Solomon Tan <wjsota@xxxxxxxxx>
> ---
>  .../staging/rtl8192e/rtl8192e/r8192E_dev.c    |  8 ++--
>  drivers/staging/rtl8192e/rtl8192e/rtl_dm.c    |  2 +-
>  drivers/staging/rtl8192e/rtl819x_BAProc.c     |  2 +-
>  drivers/staging/rtl8192e/rtllib_crypt_ccmp.c  | 10 ++---
>  drivers/staging/rtl8192e/rtllib_crypt_tkip.c  | 38 +++++++++----------
>  drivers/staging/rtl8192e/rtllib_rx.c          | 20 +++++-----
>  drivers/staging/rtl8192e/rtllib_softmac.c     | 34 ++++++++---------
>  drivers/staging/rtl8192e/rtllib_softmac_wx.c  |  4 +-
>  drivers/staging/rtl8192e/rtllib_wx.c          |  2 +-
>  9 files changed, 60 insertions(+), 60 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> index 7f9dee42a04d..a45ee95a8e6b 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
> @@ -221,7 +221,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val)
>  			 &priv->rtllib->current_network.qos_data.parameters;
>  		u8 pAcParam = *val;
>  		u32 eACI = pAcParam;
> -		union aci_aifsn *pAciAifsn = (union aci_aifsn *) &
> +		union aci_aifsn *pAciAifsn = (union aci_aifsn *)&
>  					      (qos_parameters->aifs[0]);

The & should go on the other line actually.

	union aci_aifsn *pAciAifsn = (union aci_aifsn *)
					&qos_parameters->aifs[0];


>  		u8 acm = pAciAifsn->f.acm;
>  		u8 AcmCtrl = rtl92e_readb(dev, AcmHwCtrl);
> @@ -811,7 +811,7 @@ bool rtl92e_start_adapter(struct net_device *dev)
>  
>  	rtl92e_config_mac(dev);
>  
> -	if (priv->card_8192_version > (u8) VERSION_8190_BD) {
> +	if (priv->card_8192_version > (u8)VERSION_8190_BD) {

This cast is unnecessary.  Just delete it.  In a separate patch.

>  		rtl92e_get_tx_power(dev);
>  		rtl92e_set_tx_power(dev, priv->chan);
>  	}
> @@ -1613,9 +1613,9 @@ static void _rtl92e_query_rxphystatus(
>  				total_rssi += RSSI;
>  
>  			if (bpacket_match_bssid) {
> -				pstats->RxMIMOSignalStrength[i] = (u8) RSSI;
> +				pstats->RxMIMOSignalStrength[i] = (u8)RSSI;
>  				precord_stats->RxMIMOSignalStrength[i] =
> -								(u8) RSSI;
> +								(u8)RSSI;

Same thing delete.

>  			}
>  		}
>  
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> index 756d8db51937..aa942d915992 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
> @@ -844,7 +844,7 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
>  		TempCCk = rtl92e_get_bb_reg(dev, rCCK0_TxFilter1, bMaskByte2);
>  		for (i = 0; i < CCK_Table_length; i++) {
>  			if (TempCCk == (u32)CCKSwingTable_Ch1_Ch13[i][0]) {
> -				priv->CCK_index = (u8) i;
> +				priv->CCK_index = (u8)i;

Same thing.

>  				RT_TRACE(COMP_POWER_TRACKING,
>  					 "Initial reg0x%x = 0x%x, CCK_index = 0x%x\n",
>  					 rCCK0_TxFilter1, TempCCk,
> diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> index 97afea4c3511..4616ea8266b3 100644
> --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
> +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
> @@ -238,7 +238,7 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb)
>  			     skb->data, skb->len);
>  #endif
>  
> -	req = (struct rtllib_hdr_3addr *) skb->data;
> +	req = (struct rtllib_hdr_3addr *)skb->data;
>  	tag = (u8 *)req;
>  	dst = (u8 *)(&req->addr2[0]);
>  	tag += sizeof(struct rtllib_hdr_3addr);
> diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
> index ed968c01c7ff..a8d22da8bc9a 100644
> --- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
> +++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c
> @@ -103,7 +103,7 @@ static int ccmp_init_iv_and_aad(struct rtllib_hdr_4addr *hdr,
>  	if (a4_included)
>  		aad_len += 6;
>  	if (qc_included) {
> -		pos = (u8 *) &hdr->addr4;
> +		pos = (u8 *)&hdr->addr4;
>  		if (a4_included)
>  			pos += 6;
>  		qc = *pos & 0x0f;
> @@ -130,13 +130,13 @@ static int ccmp_init_iv_and_aad(struct rtllib_hdr_4addr *hdr,
>  	 * A4 (if present)
>  	 * QC (if present)
>  	 */
> -	pos = (u8 *) hdr;
> +	pos = (u8 *)hdr;
>  	aad[0] = pos[0] & 0x8f;
>  	aad[1] = pos[1] & 0xc7;
>  	memcpy(&aad[2], &hdr->addr1, ETH_ALEN);
>  	memcpy(&aad[8], &hdr->addr2, ETH_ALEN);
>  	memcpy(&aad[14], &hdr->addr3, ETH_ALEN);
> -	pos = (u8 *) &hdr->seq_ctl;
> +	pos = (u8 *)&hdr->seq_ctl;
>  	aad[20] = pos[0] & 0x0f;
>  	aad[21] = 0; /* all bits masked */
>  	memset(aad + 22, 0, 8);
> @@ -186,7 +186,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
>  	*pos++ = key->tx_pn[1];
>  	*pos++ = key->tx_pn[0];
>  
> -	hdr = (struct rtllib_hdr_4addr *) skb->data;
> +	hdr = (struct rtllib_hdr_4addr *)skb->data;
>  	if (!tcb_desc->bHwSec) {
>  		struct aead_request *req;
>  		struct scatterlist sg[2];
> @@ -235,7 +235,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
>  		return -1;
>  	}
>  
> -	hdr = (struct rtllib_hdr_4addr *) skb->data;
> +	hdr = (struct rtllib_hdr_4addr *)skb->data;
>  	pos = skb->data + hdr_len;
>  	keyidx = pos[3];
>  	if (!(keyidx & (1 << 5))) {
> diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
> index 4a760ecbc31e..a305b79c53e7 100644
> --- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
> +++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c
> @@ -136,7 +136,7 @@ static inline u16 Hi16(u32 val)
>  
>  static inline u16 Mk16(u8 hi, u8 lo)
>  {
> -	return lo | (((u16) hi) << 8);
> +	return lo | (((u16)hi) << 8);

Delete this cast.

>  }

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