* [PATCH v2 0/3] Fixed commenting style problem
@ 2014-07-31 5:43 Sanjeev Sharma
2014-07-31 5:43 ` [PATCH v2 1/3] staging:r8180: coding style: Fixed commenting style Sanjeev Sharma
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sanjeev Sharma @ 2014-07-31 5:43 UTC (permalink / raw)
To: gregkh; +Cc: oort10, devel, linux-kernel, Sanjeev Sharma
AddedSigned-off-by: line that was missing.
Sanjeev Sharma (3):
staging:r8180: coding style: Fixed commenting style
staging:r8180: coding style: Fixed too long lines
staging:r8190: coding style: Fixed checkpatch reported Error
drivers/staging/rtl8192u/r8180_93cx6.c | 15 +--
drivers/staging/rtl8192u/r8180_93cx6.h | 11 +-
drivers/staging/rtl8192u/r8190_rtl8256.c | 169 +++++++++++++++----------------
3 files changed, 95 insertions(+), 100 deletions(-)
--
1.7.11.7
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v2 1/3] staging:r8180: coding style: Fixed commenting style 2014-07-31 5:43 [PATCH v2 0/3] Fixed commenting style problem Sanjeev Sharma @ 2014-07-31 5:43 ` Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 2/3] staging:r8180: coding style: Fixed too long lines Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error Sanjeev Sharma 2 siblings, 0 replies; 6+ messages in thread From: Sanjeev Sharma @ 2014-07-31 5:43 UTC (permalink / raw) To: gregkh; +Cc: oort10, devel, linux-kernel, Sanjeev Sharma, Sanjeev Sharma This is a patch to the r8180_93cx6.c file that fixes commenting style warning Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> --- Changes in v2: - Added signed-off field. drivers/staging/rtl8192u/r8180_93cx6.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/r8180_93cx6.c b/drivers/staging/rtl8192u/r8180_93cx6.c index fb8a7a8..97d9b3f 100644 --- a/drivers/staging/rtl8192u/r8180_93cx6.c +++ b/drivers/staging/rtl8192u/r8180_93cx6.c @@ -103,7 +103,7 @@ u32 eprom_read(struct net_device *dev, u32 addr) u32 ret; ret = 0; - //enable EPROM programming + /* enable EPROM programming */ write_nic_byte_E(dev, EPROM_CMD, (EPROM_CMD_PROGRAM<<EPROM_CMD_OPERATING_MODE_SHIFT)); force_pci_posting(dev); @@ -133,13 +133,16 @@ u32 eprom_read(struct net_device *dev, u32 addr) eprom_send_bits_string(dev, read_cmd, 3); eprom_send_bits_string(dev, addr_str, addr_len); - //keep chip pin D to low state while reading. - //I'm unsure if it is necessary, but anyway shouldn't hurt + /* + * keep chip pin D to low state while reading. + * I'm unsure if it is necessary, but anyway shouldn't hurt + */ eprom_w(dev, 0); for (i = 0; i < 16; i++) { - //eeprom needs a clk cycle between writing opcode&adr - //and reading data. (eeprom outs a dummy 0) + /* eeprom needs a clk cycle between writing opcode&adr + * and reading data. (eeprom outs a dummy 0) + */ eprom_ck_cycle(dev); ret |= (eprom_r(dev)<<(15-i)); } @@ -147,7 +150,7 @@ u32 eprom_read(struct net_device *dev, u32 addr) eprom_cs(dev, 0); eprom_ck_cycle(dev); - //disable EPROM programming + /* disable EPROM programming */ write_nic_byte_E(dev, EPROM_CMD, (EPROM_CMD_NORMAL<<EPROM_CMD_OPERATING_MODE_SHIFT)); return ret; -- 1.7.11.7 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] staging:r8180: coding style: Fixed too long lines 2014-07-31 5:43 [PATCH v2 0/3] Fixed commenting style problem Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 1/3] staging:r8180: coding style: Fixed commenting style Sanjeev Sharma @ 2014-07-31 5:43 ` Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error Sanjeev Sharma 2 siblings, 0 replies; 6+ messages in thread From: Sanjeev Sharma @ 2014-07-31 5:43 UTC (permalink / raw) To: gregkh; +Cc: oort10, devel, linux-kernel, Sanjeev Sharma, Sanjeev Sharma This is a patch to the r8180_93cx6.h file that fixes long lines along with some additional warning. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> --- Changes in v2: - Added signed-off field. drivers/staging/rtl8192u/r8180_93cx6.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8180_93cx6.h b/drivers/staging/rtl8192u/r8180_93cx6.h index ee55dbf..b840348 100644 --- a/drivers/staging/rtl8192u/r8180_93cx6.h +++ b/drivers/staging/rtl8192u/r8180_93cx6.h @@ -3,11 +3,14 @@ Copyright (C) Andrea Merello 2004-2005 <andrea.merello@gmail.com> Released under the terms of GPL (General Public Licence) - Parts of this driver are based on the GPL part of the official realtek driver - Parts of this driver are based on the rtl8180 driver skeleton from Patric Schenke & Andres Salomon + Parts of this driver are based on the GPL part of the + official realtek driver + Parts of this driver are based on the rtl8180 driver skeleton + from Patric Schenke & Andres Salomon Parts of this driver are based on the Intel Pro Wireless 2100 GPL driver - We want to thank the Authors of such projects and the Ndiswrapper project Authors. + We want to thank the Authors of such projects and the Ndiswrapper + project Authors. */ /*This files contains card eeprom (93c46 or 93c56) programming routines*/ @@ -37,4 +40,4 @@ #define EPROM_TXPW1 0x3d -u32 eprom_read(struct net_device *dev,u32 addr); //reads a 16 bits word +u32 eprom_read(struct net_device *dev, u32 addr); /* reads a 16 bits word */ -- 1.7.11.7 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error 2014-07-31 5:43 [PATCH v2 0/3] Fixed commenting style problem Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 1/3] staging:r8180: coding style: Fixed commenting style Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 2/3] staging:r8180: coding style: Fixed too long lines Sanjeev Sharma @ 2014-07-31 5:43 ` Sanjeev Sharma 2014-08-06 9:33 ` Sharma, Sanjeev 2 siblings, 1 reply; 6+ messages in thread From: Sanjeev Sharma @ 2014-07-31 5:43 UTC (permalink / raw) To: gregkh; +Cc: oort10, devel, linux-kernel, Sanjeev Sharma, Sanjeev Sharma This is a patch to the r8190_rtl8256.c file that fixes checkpatch reported space & coding style issues. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> --- Changes in v2: - Added space character in the signed-off-by field. drivers/staging/rtl8192u/r8190_rtl8256.c | 169 +++++++++++++++---------------- 1 file changed, 79 insertions(+), 90 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 08e1bc9..43ed768 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -23,62 +23,64 @@ * Return: NONE * Note: 8226 support both 20M and 40 MHz *---------------------------------------------------------------------------*/ -void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH Bandwidth) //20M or 40M +void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH Bandwidth) { u8 eRFPath; struct r8192_priv *priv = ieee80211_priv(dev); - //for(eRFPath = RF90_PATH_A; eRFPath <pHalData->NumTotalRFPath; eRFPath++) - for(eRFPath = 0; eRFPath <RF90_PATH_MAX; eRFPath++) - { + /* for(eRFPath = RF90_PATH_A; eRFPath <pHalData->NumTotalRFPath; + * eRFPath++) + */ + for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) { if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath)) continue; - switch (Bandwidth) - { - case HT_CHANNEL_WIDTH_20: - if(priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: consider it later! - { - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x100); //phy para:1ba - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3d7); - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x021); - - //cosa add for sd3's request 01/23/2008 - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } - else - { + switch (Bandwidth) { + case HT_CHANNEL_WIDTH_20: + if (priv->card_8192_version == VERSION_819xU_A + || priv->card_8192_version + == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x100); /* phy para:1ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3d7); + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x021); + + /* cosa add for sd3's request 01/23/2008 + */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x14, bMask12Bits, 0x5ab); + } else { RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - + } break; - case HT_CHANNEL_WIDTH_20_40: - if(priv->card_8192_version == VERSION_819xU_A ||priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: consider it later! - { + case HT_CHANNEL_WIDTH_20_40: + if (priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); //phy para:3ba rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3df); rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x0a1); //cosa add for sd3's request 01/23/2008 - if(priv->chan == 3 || priv->chan == 9) //I need to set priv->chan whenever current channel changes + if (priv->chan == 3 || priv->chan == 9) + //I need to set priv->chan whenever current channel changes rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x59b); else rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } - else - { + } else { RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - - + } break; - default: - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown Bandwidth: %#X\n",Bandwidth); + default: + RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown Bandwidth: %#X\n", Bandwidth); break; } } - return; } /*-------------------------------------------------------------------------- * Overview: Interface to config 8256 @@ -95,8 +97,6 @@ void PHY_RF8256_Config(struct net_device *dev) priv->NumTotalRFPath = RTL819X_TOTAL_RF_PATH; // Config BB and RF phy_RF8256_Config_ParaFile(dev); - - return; } /*-------------------------------------------------------------------------- * Overview: Interface to config 8256 @@ -122,8 +122,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) //3//----------------------------------------------------------------- //3// <2> Initialize RF //3//----------------------------------------------------------------- - for(eRFPath = (RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath <priv->NumTotalRFPath; eRFPath++) - { + for (eRFPath = (RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath < priv->NumTotalRFPath; eRFPath++) { if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath)) continue; @@ -133,13 +132,12 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) // pHalData->RfReg0Value[eRFPath] = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, rGlobalCtrl, bMaskDWord); /*----Store original RFENV control type----*/ - switch (eRFPath) - { + switch (eRFPath) { case RF90_PATH_A: case RF90_PATH_C: u4RegValue = rtl8192_QueryBBReg(dev, pPhyReg->rfintfs, bRFSI_RFENV); break; - case RF90_PATH_B : + case RF90_PATH_B: case RF90_PATH_D: u4RegValue = rtl8192_QueryBBReg(dev, pPhyReg->rfintfs, bRFSI_RFENV<<16); break; @@ -159,8 +157,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) /*----Check RF block (for FPGA platform only)----*/ // TODO: this function should be removed on ASIC , Emily 2007.2.2 - if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (RF90_RADIO_PATH_E)eRFPath)) - { + if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (RF90_RADIO_PATH_E)eRFPath)) { RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check Radio[%d] Fail!!\n", eRFPath); goto phy_RF8256_Config_ParaFile_Fail; } @@ -168,39 +165,34 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) RetryTimes = ConstRetryTimes; RF3_Final_Value = 0; /*----Initialize RF fom connfiguration file----*/ - switch (eRFPath) - { + switch (eRFPath) { case RF90_PATH_A: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; } break; case RF90_PATH_B: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; } break; case RF90_PATH_C: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; } break; case RF90_PATH_D: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, (RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; @@ -209,50 +201,48 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) } /*----Restore RFENV control type----*/; - switch (eRFPath) - { + switch (eRFPath) { case RF90_PATH_A: case RF90_PATH_C: rtl8192_setBBreg(dev, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue); break; - case RF90_PATH_B : + case RF90_PATH_B: case RF90_PATH_D: rtl8192_setBBreg(dev, pPhyReg->rfintfs, bRFSI_RFENV<<16, u4RegValue); break; } - if(ret){ + if (ret) { RT_TRACE(COMP_ERR, "phy_RF8256_Config_ParaFile():Radio[%d] Fail!!", eRFPath); goto phy_RF8256_Config_ParaFile_Fail; } } - RT_TRACE(COMP_PHY, "PHY Initialization Success\n") ; - return ; + RT_TRACE(COMP_PHY, "PHY Initialization Success\n"); + return; phy_RF8256_Config_ParaFile_Fail: - RT_TRACE(COMP_ERR, "PHY Initialization failed\n") ; - return ; + RT_TRACE(COMP_ERR, "PHY Initialization failed\n"); } void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8 powerlevel) { - u32 TxAGC=0; + u32 TxAGC = 0; struct r8192_priv *priv = ieee80211_priv(dev); //modified by vivi, 20080109 TxAGC = powerlevel; - if(priv->bDynamicTxLowPower == TRUE) //cosa 05/22/2008 for scan - { - if(priv->CustomerID == RT_CID_819x_Netcore) + if (priv->bDynamicTxLowPower == TRUE) { + //cosa 05/22/2008 for scan + if (priv->CustomerID == RT_CID_819x_Netcore) TxAGC = 0x22; else TxAGC += priv->CckPwEnl; } - if(TxAGC > 0x24) + if (TxAGC > 0x24) TxAGC = 0x24; rtl8192_setBBreg(dev, rTxAGC_CCK_Mcs32, bTxAGCRateCCK, TxAGC); } @@ -268,43 +258,42 @@ void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel) u8 byte0, byte1, byte2, byte3; powerBase0 = powerlevel + priv->TxPowerDiff; //OFDM rates - powerBase0 = (powerBase0<<24) | (powerBase0<<16) |(powerBase0<<8) |powerBase0; + powerBase0 = (powerBase0<<24) | (powerBase0<<16) | (powerBase0<<8) | powerBase0; powerBase1 = powerlevel; //MCS rates - powerBase1 = (powerBase1<<24) | (powerBase1<<16) |(powerBase1<<8) |powerBase1; + powerBase1 = (powerBase1<<24) | (powerBase1<<16) | (powerBase1<<8) | powerBase1; - for(index=0; index<6; index++) - { - writeVal = priv->MCSTxPowerLevelOriginalOffset[index] + ((index<2)?powerBase0:powerBase1); + for (index = 0; index < 6; index++) { + writeVal = priv->MCSTxPowerLevelOriginalOffset[index] + ((index < 2)?powerBase0:powerBase1); byte0 = (u8)(writeVal & 0x7f); byte1 = (u8)((writeVal & 0x7f00)>>8); byte2 = (u8)((writeVal & 0x7f0000)>>16); byte3 = (u8)((writeVal & 0x7f000000)>>24); - if(byte0 > 0x24) // Max power index = 0x24 + + if (byte0 > 0x24) + /* Max power index = 0x24 */ byte0 = 0x24; - if(byte1 > 0x24) + if (byte1 > 0x24) byte1 = 0x24; - if(byte2 > 0x24) + if (byte2 > 0x24) byte2 = 0x24; - if(byte3 > 0x24) + if (byte3 > 0x24) byte3 = 0x24; //for tx power track - if(index == 3) - { - writeVal_tmp = (byte3<<24) | (byte2<<16) |(byte1<<8) |byte0; + if (index == 3) { + writeVal_tmp = (byte3<<24) | (byte2<<16) | (byte1<<8) | byte0; priv->Pwr_Track = writeVal_tmp; } - if(priv->bDynamicTxHighPower == TRUE) //Add by Jacken 2008/03/06 - { - // Emily, 20080613. Set low tx power for both MCS and legacy OFDM + if (priv->bDynamicTxHighPower == TRUE) { + /*Add by Jacken 2008/03/06 + *Emily, 20080613. Set low tx power for both MCS and legacy OFDM + */ writeVal = 0x03030303; - } - else - { - writeVal = (byte3<<24) | (byte2<<16) |(byte1<<8) |byte0; - } - rtl8192_setBBreg(dev, RegOffset[index], 0x7f7f7f7f, writeVal); + } else { + writeVal = (byte3<<24) | (byte2<<16) | (byte1<<8) | byte0; + } + rtl8192_setBBreg(dev, RegOffset[index], 0x7f7f7f7f, writeVal); } return; -- 1.7.11.7 ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error 2014-07-31 5:43 ` [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error Sanjeev Sharma @ 2014-08-06 9:33 ` Sharma, Sanjeev 2014-08-06 14:36 ` gregkh 0 siblings, 1 reply; 6+ messages in thread From: Sharma, Sanjeev @ 2014-08-06 9:33 UTC (permalink / raw) To: Sharma, Sanjeev, gregkh; +Cc: oort10, devel, linux-kernel Hello All, I have submitted few patches last week and also get reply from Greg that patches will show up in linux-next tree and in parallel I need to submit new patches and now Looks like I need to Sync my tree with linux-next tree before start working on New set of change and as soon as I am pulling change I always get conflicts. Anyone has idea who to overcome this problem ? Regards Sanjeev Sharma -----Original Message----- From: Sanjeev Sharma [mailto:sanjeev_sharma@mentor.com] Sent: Thursday, July 31, 2014 11:14 AM To: gregkh@linuxfoundation.org Cc: oort10@gmail.com; devel@driverdev.osuosl.org; linux-kernel@vger.kernel.org; Sharma, Sanjeev; Sharma, Sanjeev Subject: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error This is a patch to the r8190_rtl8256.c file that fixes checkpatch reported space & coding style issues. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> --- Changes in v2: - Added space character in the signed-off-by field. drivers/staging/rtl8192u/r8190_rtl8256.c | 169 +++++++++++++++---------------- 1 file changed, 79 insertions(+), 90 deletions(-) diff --git a/drivers/staging/rtl8192u/r8190_rtl8256.c b/drivers/staging/rtl8192u/r8190_rtl8256.c index 08e1bc9..43ed768 100644 --- a/drivers/staging/rtl8192u/r8190_rtl8256.c +++ b/drivers/staging/rtl8192u/r8190_rtl8256.c @@ -23,62 +23,64 @@ * Return: NONE * Note: 8226 support both 20M and 40 MHz *---------------------------------------------------------------------------*/ -void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH Bandwidth) //20M or 40M +void PHY_SetRF8256Bandwidth(struct net_device *dev , HT_CHANNEL_WIDTH +Bandwidth) { u8 eRFPath; struct r8192_priv *priv = ieee80211_priv(dev); - //for(eRFPath = RF90_PATH_A; eRFPath <pHalData->NumTotalRFPath; eRFPath++) - for(eRFPath = 0; eRFPath <RF90_PATH_MAX; eRFPath++) - { + /* for(eRFPath = RF90_PATH_A; eRFPath <pHalData->NumTotalRFPath; + * eRFPath++) + */ + for (eRFPath = 0; eRFPath < RF90_PATH_MAX; eRFPath++) { if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath)) continue; - switch (Bandwidth) - { - case HT_CHANNEL_WIDTH_20: - if(priv->card_8192_version == VERSION_819xU_A || priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: consider it later! - { - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x100); //phy para:1ba - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3d7); - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x021); - - //cosa add for sd3's request 01/23/2008 - rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } - else - { + switch (Bandwidth) { + case HT_CHANNEL_WIDTH_20: + if (priv->card_8192_version == VERSION_819xU_A + || priv->card_8192_version + == VERSION_819xU_B) { /* 8256 D-cut, E-cut, xiong: consider it later! */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0b, bMask12Bits, 0x100); /* phy para:1ba */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x2c, bMask12Bits, 0x3d7); + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x0e, bMask12Bits, 0x021); + + /* cosa add for sd3's request 01/23/2008 + */ + rtl8192_phy_SetRFReg(dev, + (RF90_RADIO_PATH_E)eRFPath, + 0x14, bMask12Bits, 0x5ab); + } else { RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - + } break; - case HT_CHANNEL_WIDTH_20_40: - if(priv->card_8192_version == VERSION_819xU_A ||priv->card_8192_version == VERSION_819xU_B)// 8256 D-cut, E-cut, xiong: consider it later! - { + case HT_CHANNEL_WIDTH_20_40: + if (priv->card_8192_version == VERSION_819xU_A || +priv->card_8192_version == VERSION_819xU_B) { /* 8256 D-cut, E-cut, +xiong: consider it later! */ rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0b, bMask12Bits, 0x300); //phy para:3ba rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x2c, bMask12Bits, 0x3df); rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x0e, bMask12Bits, 0x0a1); //cosa add for sd3's request 01/23/2008 - if(priv->chan == 3 || priv->chan == 9) //I need to set priv->chan whenever current channel changes + if (priv->chan == 3 || priv->chan == 9) + //I need to set priv->chan whenever current channel changes rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x59b); else rtl8192_phy_SetRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, 0x14, bMask12Bits, 0x5ab); - } - else - { + } else { RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown hardware version\n"); - } - - + } break; - default: - RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown Bandwidth: %#X\n",Bandwidth); + default: + RT_TRACE(COMP_ERR, "PHY_SetRF8256Bandwidth(): unknown Bandwidth: +%#X\n", Bandwidth); break; } } - return; } /*-------------------------------------------------------------------------- * Overview: Interface to config 8256 @@ -95,8 +97,6 @@ void PHY_RF8256_Config(struct net_device *dev) priv->NumTotalRFPath = RTL819X_TOTAL_RF_PATH; // Config BB and RF phy_RF8256_Config_ParaFile(dev); - - return; } /*-------------------------------------------------------------------------- * Overview: Interface to config 8256 @@ -122,8 +122,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) //3//----------------------------------------------------------------- //3// <2> Initialize RF //3//----------------------------------------------------------------- - for(eRFPath = (RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath <priv->NumTotalRFPath; eRFPath++) - { + for (eRFPath = (RF90_RADIO_PATH_E)RF90_PATH_A; eRFPath < +priv->NumTotalRFPath; eRFPath++) { if (!rtl8192_phy_CheckIsLegalRFPath(dev, eRFPath)) continue; @@ -133,13 +132,12 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) // pHalData->RfReg0Value[eRFPath] = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, rGlobalCtrl, bMaskDWord); /*----Store original RFENV control type----*/ - switch (eRFPath) - { + switch (eRFPath) { case RF90_PATH_A: case RF90_PATH_C: u4RegValue = rtl8192_QueryBBReg(dev, pPhyReg->rfintfs, bRFSI_RFENV); break; - case RF90_PATH_B : + case RF90_PATH_B: case RF90_PATH_D: u4RegValue = rtl8192_QueryBBReg(dev, pPhyReg->rfintfs, bRFSI_RFENV<<16); break; @@ -159,8 +157,7 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) /*----Check RF block (for FPGA platform only)----*/ // TODO: this function should be removed on ASIC , Emily 2007.2.2 - if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, (RF90_RADIO_PATH_E)eRFPath)) - { + if (rtl8192_phy_checkBBAndRF(dev, HW90_BLOCK_RF, +(RF90_RADIO_PATH_E)eRFPath)) { RT_TRACE(COMP_ERR, "PHY_RF8256_Config():Check Radio[%d] Fail!!\n", eRFPath); goto phy_RF8256_Config_ParaFile_Fail; } @@ -168,39 +165,34 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) RetryTimes = ConstRetryTimes; RF3_Final_Value = 0; /*----Initialize RF fom connfiguration file----*/ - switch (eRFPath) - { + switch (eRFPath) { case RF90_PATH_A: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, +(RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; } break; case RF90_PATH_B: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, +(RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; } break; case RF90_PATH_C: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, +(RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; } break; case RF90_PATH_D: - while(RF3_Final_Value!=RegValueToBeCheck && RetryTimes!=0) - { - ret = rtl8192_phy_ConfigRFWithHeaderFile(dev,(RF90_RADIO_PATH_E)eRFPath); + while (RF3_Final_Value != RegValueToBeCheck && RetryTimes != 0) { + ret = rtl8192_phy_ConfigRFWithHeaderFile(dev, +(RF90_RADIO_PATH_E)eRFPath); RF3_Final_Value = rtl8192_phy_QueryRFReg(dev, (RF90_RADIO_PATH_E)eRFPath, RegOffSetToBeCheck, bMask12Bits); RT_TRACE(COMP_RF, "RF %d %d register final value: %x\n", eRFPath, RegOffSetToBeCheck, RF3_Final_Value); RetryTimes--; @@ -209,50 +201,48 @@ void phy_RF8256_Config_ParaFile(struct net_device *dev) } /*----Restore RFENV control type----*/; - switch (eRFPath) - { + switch (eRFPath) { case RF90_PATH_A: case RF90_PATH_C: rtl8192_setBBreg(dev, pPhyReg->rfintfs, bRFSI_RFENV, u4RegValue); break; - case RF90_PATH_B : + case RF90_PATH_B: case RF90_PATH_D: rtl8192_setBBreg(dev, pPhyReg->rfintfs, bRFSI_RFENV<<16, u4RegValue); break; } - if(ret){ + if (ret) { RT_TRACE(COMP_ERR, "phy_RF8256_Config_ParaFile():Radio[%d] Fail!!", eRFPath); goto phy_RF8256_Config_ParaFile_Fail; } } - RT_TRACE(COMP_PHY, "PHY Initialization Success\n") ; - return ; + RT_TRACE(COMP_PHY, "PHY Initialization Success\n"); + return; phy_RF8256_Config_ParaFile_Fail: - RT_TRACE(COMP_ERR, "PHY Initialization failed\n") ; - return ; + RT_TRACE(COMP_ERR, "PHY Initialization failed\n"); } void PHY_SetRF8256CCKTxPower(struct net_device *dev, u8 powerlevel) { - u32 TxAGC=0; + u32 TxAGC = 0; struct r8192_priv *priv = ieee80211_priv(dev); //modified by vivi, 20080109 TxAGC = powerlevel; - if(priv->bDynamicTxLowPower == TRUE) //cosa 05/22/2008 for scan - { - if(priv->CustomerID == RT_CID_819x_Netcore) + if (priv->bDynamicTxLowPower == TRUE) { + //cosa 05/22/2008 for scan + if (priv->CustomerID == RT_CID_819x_Netcore) TxAGC = 0x22; else TxAGC += priv->CckPwEnl; } - if(TxAGC > 0x24) + if (TxAGC > 0x24) TxAGC = 0x24; rtl8192_setBBreg(dev, rTxAGC_CCK_Mcs32, bTxAGCRateCCK, TxAGC); } @@ -268,43 +258,42 @@ void PHY_SetRF8256OFDMTxPower(struct net_device *dev, u8 powerlevel) u8 byte0, byte1, byte2, byte3; powerBase0 = powerlevel + priv->TxPowerDiff; //OFDM rates - powerBase0 = (powerBase0<<24) | (powerBase0<<16) |(powerBase0<<8) |powerBase0; + powerBase0 = (powerBase0<<24) | (powerBase0<<16) | (powerBase0<<8) | +powerBase0; powerBase1 = powerlevel; //MCS rates - powerBase1 = (powerBase1<<24) | (powerBase1<<16) |(powerBase1<<8) |powerBase1; + powerBase1 = (powerBase1<<24) | (powerBase1<<16) | (powerBase1<<8) | +powerBase1; - for(index=0; index<6; index++) - { - writeVal = priv->MCSTxPowerLevelOriginalOffset[index] + ((index<2)?powerBase0:powerBase1); + for (index = 0; index < 6; index++) { + writeVal = priv->MCSTxPowerLevelOriginalOffset[index] + ((index < +2)?powerBase0:powerBase1); byte0 = (u8)(writeVal & 0x7f); byte1 = (u8)((writeVal & 0x7f00)>>8); byte2 = (u8)((writeVal & 0x7f0000)>>16); byte3 = (u8)((writeVal & 0x7f000000)>>24); - if(byte0 > 0x24) // Max power index = 0x24 + + if (byte0 > 0x24) + /* Max power index = 0x24 */ byte0 = 0x24; - if(byte1 > 0x24) + if (byte1 > 0x24) byte1 = 0x24; - if(byte2 > 0x24) + if (byte2 > 0x24) byte2 = 0x24; - if(byte3 > 0x24) + if (byte3 > 0x24) byte3 = 0x24; //for tx power track - if(index == 3) - { - writeVal_tmp = (byte3<<24) | (byte2<<16) |(byte1<<8) |byte0; + if (index == 3) { + writeVal_tmp = (byte3<<24) | (byte2<<16) | (byte1<<8) | byte0; priv->Pwr_Track = writeVal_tmp; } - if(priv->bDynamicTxHighPower == TRUE) //Add by Jacken 2008/03/06 - { - // Emily, 20080613. Set low tx power for both MCS and legacy OFDM + if (priv->bDynamicTxHighPower == TRUE) { + /*Add by Jacken 2008/03/06 + *Emily, 20080613. Set low tx power for both MCS and legacy OFDM + */ writeVal = 0x03030303; - } - else - { - writeVal = (byte3<<24) | (byte2<<16) |(byte1<<8) |byte0; - } - rtl8192_setBBreg(dev, RegOffset[index], 0x7f7f7f7f, writeVal); + } else { + writeVal = (byte3<<24) | (byte2<<16) | (byte1<<8) | byte0; + } + rtl8192_setBBreg(dev, RegOffset[index], 0x7f7f7f7f, writeVal); } return; -- 1.7.11.7 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error 2014-08-06 9:33 ` Sharma, Sanjeev @ 2014-08-06 14:36 ` gregkh 0 siblings, 0 replies; 6+ messages in thread From: gregkh @ 2014-08-06 14:36 UTC (permalink / raw) To: Sharma, Sanjeev; +Cc: devel, oort10, linux-kernel On Wed, Aug 06, 2014 at 09:33:56AM +0000, Sharma, Sanjeev wrote: > Hello All, > > I have submitted few patches last week and also get reply from Greg that patches will show up in linux-next tree and in parallel I need to submit new patches and now Looks like I need to > Sync my tree with linux-next tree before start working on New set of change and as soon as I am pulling change I always get conflicts. > > Anyone has idea who to overcome this problem ? Use a separate branch for your work, and also never use 'git pull' with linux-next, that just will not work at all. greg k-h ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-06 14:36 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-07-31 5:43 [PATCH v2 0/3] Fixed commenting style problem Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 1/3] staging:r8180: coding style: Fixed commenting style Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 2/3] staging:r8180: coding style: Fixed too long lines Sanjeev Sharma 2014-07-31 5:43 ` [PATCH v2 3/3] staging:r8190: coding style: Fixed checkpatch reported Error Sanjeev Sharma 2014-08-06 9:33 ` Sharma, Sanjeev 2014-08-06 14:36 ` gregkh
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®