Skip to contentSkip to conversation

staging: rtl8723bs: fix checkpatch style issues in odm_DynamicBBPowerSaving.c

PATCH In review Enzo Frese 2 participants 2 messages Sep 9 – Oct 1 Staging

lore
Share & tools
lore

Enzo Frese

author
#0 lore raw

PATCH 1/1 staging: rtl8723bs: fix checkpatch style issues in odm_DynamicBBPowerSaving.c

Fix several checkpatch.pl style warnings in
odm_DynamicBBPowerSaving.c:

- remove unnecessary blank line after opening brace
- add missing spaces around '&' and '>>' operators
- add braces on all arms of if/else statements
- remove trailing whitespace

CamelCase naming issues are left untouched, as renaming these identifiers would require wider refactoring across the driver, as already noted in the driver's TODO file.

---
 .../rtl8723bs/hal/odm_DynamicBBPowerSaving.c  | 36 +++++++++++--------
 1 file changed, 22 insertions(+), 14 deletions(-)
drivers/staging/rtl8723bs/hal/odm_DynamicBBPowerSaving.c +22 -14
index ba6357c6a7ed..ed743f6678dc 100644
@@ -33,11 +33,10 @@ void ODM_RF_Saving(void *pDM_VOID, u8 bForceInNormal)
 	}
 
 	if (pDM_PSTable->initialize == 0) {
-
-		pDM_PSTable->Reg874 = (PHY_QueryBBReg(pDM_Odm->Adapter, 0x874, bMaskDWord)&0x1CC000)>>14;
-		pDM_PSTable->RegC70 = (PHY_QueryBBReg(pDM_Odm->Adapter, 0xc70, bMaskDWord)&BIT(3))>>3;
-		pDM_PSTable->Reg85C = (PHY_QueryBBReg(pDM_Odm->Adapter, 0x85c, bMaskDWord)&0xFF000000)>>24;
-		pDM_PSTable->RegA74 = (PHY_QueryBBReg(pDM_Odm->Adapter, 0xa74, bMaskDWord)&0xF000)>>12;
+		pDM_PSTable->Reg874 = (PHY_QueryBBReg(pDM_Odm->Adapter, 0x874, bMaskDWord) & 0x1CC000) >> 14;
+		pDM_PSTable->RegC70 = (PHY_QueryBBReg(pDM_Odm->Adapter, 0xc70, bMaskDWord) & BIT(3)) >> 3;
+		pDM_PSTable->Reg85C = (PHY_QueryBBReg(pDM_Odm->Adapter, 0x85c, bMaskDWord) & 0xFF000000) >> 24;
+		pDM_PSTable->RegA74 = (PHY_QueryBBReg(pDM_Odm->Adapter, 0xa74, bMaskDWord) & 0xF000) >> 12;
 		/* Reg818 = PHY_QueryBBReg(padapter, 0x818, bMaskDWord); */
 		pDM_PSTable->initialize = 1;
 	}
@@ -55,20 +54,29 @@ void ODM_RF_Saving(void *pDM_VOID, u8 bForceInNormal)
 				else
 					pDM_PSTable->CurRFState = RF_Save;
 			}
-		} else
+		} else {
 			pDM_PSTable->CurRFState = RF_MAX;
-	} else
+		}
+	} else {
 		pDM_PSTable->CurRFState = RF_Normal;
+	}
 
 	if (pDM_PSTable->PreRFState != pDM_PSTable->CurRFState) {
 		if (pDM_PSTable->CurRFState == RF_Save) {
-			PHY_SetBBReg(pDM_Odm->Adapter, 0x874, 0x1C0000, 0x2); /* Reg874[20:18]=3'b010 */
-			PHY_SetBBReg(pDM_Odm->Adapter, 0xc70, BIT(3), 0); /* RegC70[3]= 1'b0 */
-			PHY_SetBBReg(pDM_Odm->Adapter, 0x85c, 0xFF000000, 0x63); /* Reg85C[31:24]= 0x63 */
-			PHY_SetBBReg(pDM_Odm->Adapter, 0x874, 0xC000, 0x2); /* Reg874[15:14]=2'b10 */
-			PHY_SetBBReg(pDM_Odm->Adapter, 0xa74, 0xF000, 0x3); /* RegA75[7:4]= 0x3 */
-			PHY_SetBBReg(pDM_Odm->Adapter, 0x818, BIT(28), 0x0); /* Reg818[28]= 1'b0 */
-			PHY_SetBBReg(pDM_Odm->Adapter, 0x818, BIT(28), 0x1); /* Reg818[28]= 1'b1 */
+			/* Reg874[20:18]=3'b010 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0x874, 0x1C0000, 0x2);
+			/* RegC70[3]= 1'b0 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0xc70, BIT(3), 0);
+			/* Reg85C[31:24]= 0x63 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0x85c, 0xFF000000, 0x63);
+			/* Reg874[15:14]=2'b10 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0x874, 0xC000, 0x2);
+			/* RegA75[7:4]= 0x3 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0xa74, 0xF000, 0x3);
+			/* Reg818[28]= 1'b0 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0x818, BIT(28), 0x0);
+			/* Reg818[28]= 1'b1 */
+			PHY_SetBBReg(pDM_Odm->Adapter, 0x818, BIT(28), 0x1);
 		} else {
 			PHY_SetBBReg(pDM_Odm->Adapter, 0x874, 0x1CC000, pDM_PSTable->Reg874);
 			PHY_SetBBReg(pDM_Odm->Adapter, 0xc70, BIT(3), pDM_PSTable->RegC70);
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 8 lines · Enzo Frese

Fix several checkpatch.pl style warnings in
odm_DynamicBBPowerSaving.c:

- remove unnecessary blank line after opening brace
- add missing spaces around '&' and '>>' operators
- add braces on all arms of if/else statements
- remove trailing whitespace

Quoted 8 lines

CamelCase naming issues are left untouched, as renaming these identifiers would require wider refactoring across the driver, as already noted in the driver's TODO file.

---
 .../rtl8723bs/hal/odm_DynamicBBPowerSaving.c  | 36 +++++++++++--------
 1 file changed, 22 insertions(+), 14 deletions(-)

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