[v2] staging: rtl8192e: space formatting fixes in rtl_cam.c

Message ID 20221101215246.4442-1-jerom.vandersar@gmail.com
State New
Headers
Series [v2] staging: rtl8192e: space formatting fixes in rtl_cam.c |

Commit Message

Jerom van der Sar Nov. 1, 2022, 9:52 p.m. UTC
  Fixed a few coding style issues in rtl_cam.c such as double blank lines
and lack of spaces around binary operators. Some other warnings still
remain. These issues were found by scripts/checkpatch.pl.

This patch helps clean up the rtl8192e driver in staging, making it
easier to read and maintain.

Signed-off-by: Jerom van der Sar <jerom.vandersar@gmail.com>.
---
Changes in v2:
  - Reverted some formatting fixes to make the diff easier to review.

 drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
  

Comments

Philipp Hortmann Nov. 1, 2022, 10:07 p.m. UTC | #1
On 11/1/22 22:52, Jerom van der Sar wrote:
> Fixed a few coding style issues in rtl_cam.c such as double blank lines
> and lack of spaces around binary operators. Some other warnings still
> remain. These issues were found by scripts/checkpatch.pl.
> 
> This patch helps clean up the rtl8192e driver in staging, making it
> easier to read and maintain.
> 
> Signed-off-by: Jerom van der Sar <jerom.vandersar@gmail.com>.
> ---
> Changes in v2:
>    - Reverted some formatting fixes to make the diff easier to review.
> 
>   drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
> index 41faeb4b9b9b..d5aaf24a0ddb 100644
> --- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
> +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
> @@ -17,7 +17,7 @@ void rtl92e_cam_reset(struct net_device *dev)
>   {
>   	u32 ulcommand = 0;
>   
> -	ulcommand |= BIT31|BIT30;
> +	ulcommand |= BIT31 | BIT30;
>   	rtl92e_writel(dev, RWCAM, ulcommand);
>   }
>   
> @@ -40,7 +40,6 @@ void rtl92e_enable_hw_security_config(struct net_device *dev)
>   		SECR_value |= SCR_TxUseDK;
>   	}
>   
> -
>   	ieee->hwsec_active = 1;
>   	if ((ieee->pHTInfo->iot_action & HT_IOT_ACT_PURE_N_MODE) || !hwwep) {
>   		ieee->hwsec_active = 0;
> @@ -104,10 +103,9 @@ void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
>   	else
>   		usConfig |= BIT15 | (KeyType<<2) | KeyIndex;
>   
> -
>   	for (i = 0; i < CAM_CONTENT_COUNT; i++) {
>   		TargetCommand  = i + CAM_CONTENT_COUNT * EntryNo;
> -		TargetCommand |= BIT31|BIT16;
> +		TargetCommand |= BIT31 | BIT16;
>   
>   		if (i == 0) {
>   			TargetContent = (u32)(*(MacAddr+0)) << 16 |
> @@ -152,7 +150,6 @@ void rtl92e_cam_restore(struct net_device *dev)
>   
>   	if ((priv->rtllib->pairwise_key_type == KEY_TYPE_WEP40) ||
>   	    (priv->rtllib->pairwise_key_type == KEY_TYPE_WEP104)) {
> -
>   		for (EntryId = 0; EntryId < 4; EntryId++) {
>   			MacAddr = CAM_CONST_ADDR[EntryId];
>   			if (priv->rtllib->swcamtable[EntryId].bused) {


WARNING: Unexpected content after email: 'Jerom van der Sar 
<jerom.vandersar@gmail.com>.', should be: 'Jerom van der Sar 
<jerom.vandersar@gmail.com>'
#14:
Signed-off-by: Jerom van der Sar <jerom.vandersar@gmail.com>.


I cannot apply your patch.

Bye Philipp
  
Jerom van der Sar Nov. 1, 2022, 10:25 p.m. UTC | #2
On 11/1/22 23:11, Philipp Hortman wrote:
> WARNING: Unexpected content after email: 'Jerom van der Sar 
> <jerom.vandersar@gmail.com>.', should be: 'Jerom van der Sar 
> <jerom.vandersar@gmail.com>'
> #14:
> Signed-off-by: Jerom van der Sar <jerom.vandersar@gmail.com>.
>
>
> I cannot apply your patch.
>
> Bye Philipp

Thanks for the catch. Will fix.
  

Patch

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
index 41faeb4b9b9b..d5aaf24a0ddb 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
@@ -17,7 +17,7 @@  void rtl92e_cam_reset(struct net_device *dev)
 {
 	u32 ulcommand = 0;
 
-	ulcommand |= BIT31|BIT30;
+	ulcommand |= BIT31 | BIT30;
 	rtl92e_writel(dev, RWCAM, ulcommand);
 }
 
@@ -40,7 +40,6 @@  void rtl92e_enable_hw_security_config(struct net_device *dev)
 		SECR_value |= SCR_TxUseDK;
 	}
 
-
 	ieee->hwsec_active = 1;
 	if ((ieee->pHTInfo->iot_action & HT_IOT_ACT_PURE_N_MODE) || !hwwep) {
 		ieee->hwsec_active = 0;
@@ -104,10 +103,9 @@  void rtl92e_set_key(struct net_device *dev, u8 EntryNo, u8 KeyIndex,
 	else
 		usConfig |= BIT15 | (KeyType<<2) | KeyIndex;
 
-
 	for (i = 0; i < CAM_CONTENT_COUNT; i++) {
 		TargetCommand  = i + CAM_CONTENT_COUNT * EntryNo;
-		TargetCommand |= BIT31|BIT16;
+		TargetCommand |= BIT31 | BIT16;
 
 		if (i == 0) {
 			TargetContent = (u32)(*(MacAddr+0)) << 16 |
@@ -152,7 +150,6 @@  void rtl92e_cam_restore(struct net_device *dev)
 
 	if ((priv->rtllib->pairwise_key_type == KEY_TYPE_WEP40) ||
 	    (priv->rtllib->pairwise_key_type == KEY_TYPE_WEP104)) {
-
 		for (EntryId = 0; EntryId < 4; EntryId++) {
 			MacAddr = CAM_CONST_ADDR[EntryId];
 			if (priv->rtllib->swcamtable[EntryId].bused) {