All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: fix checkpatch error/warning in r819xU_phy.c
@ 2014-07-08  6:04 sanjeev sharma
  2014-07-08  7:43 ` Dan Carpenter
  0 siblings, 1 reply; 27+ messages in thread
From: sanjeev sharma @ 2014-07-08  6:04 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, devel, linux-kernel, sanjeevs1, Sanjeev Sharma

From: sanjeevs1 <sanjeev_sharma@mentor.com>

This is a patch to the r819xU_phy.c file that fixes up all the Error/Warning found by the checkpatch.pl tool

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 76 +++++++++++++++++------------------
 1 file changed, 36 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 02554c9..1dd1c1e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -101,16 +101,15 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 	} else {
 		write_nic_dword(dev, reg_addr, data);
 	}
-	return;
 }
 
 /******************************************************************************
  * function:  This function reads specific bits from BB register
  * input:     net_device	*dev
- *            u32	 	reg_addr   //target addr to be readback
- *            u32	 	bitmask    //taget bit pos to be readback
- * output:    none
- * return:    u32	 	data       //the readback register value
+ * u32		reg_addr   //target addr to be readback
+ * u32		bitmask    //taget bit pos to be readback
+ * output:	none
+ * return:	u32		data       //the readback register value
  * notice:
  ******************************************************************************/
 u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
@@ -192,7 +191,7 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,
 
 
 	/* TODO: we should not delay such a long time. Ask for help from SD3 */
-	usleep_range(1000, 1000);
+	usleep_range(1000, 2000);
 
 	ret = rtl8192_QueryBBReg(dev, pPhyReg->rfLSSIReadBack,
 				 bLSSIReadBackData);
@@ -281,7 +280,6 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
 					 priv->RfReg0Value[eRFPath] << 16);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -332,7 +330,6 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
 			rtl8192_phy_RFSerialWrite(dev, eRFPath, reg_addr, data);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -481,9 +478,9 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 /******************************************************************************
  * function:  This function reads BB parameters from header file we generate,
  *            and do register read/write
- * input:     net_device 	*dev
- * output:    none
- * return:    none
+ * input:	net_device	*dev
+ * output:	none
+ * return:	none
  * notice:    BB parameters may change all the time, so please make
  *            sure it has been synced with the newest.
  *****************************************************************************/
@@ -513,7 +510,6 @@ void rtl8192_phy_configmac(struct net_device *dev)
 		rtl8192_setBBreg(dev, pdwArray[i], pdwArray[i+1],
 				 pdwArray[i+2]);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -559,7 +555,6 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
 				 rtl819XAGCTAB_Array[i+1]);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -746,11 +741,11 @@ u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, HW90_BLOCK_E CheckBlock,
 					     bMask12Bits, WriteData[i]);
 			/* TODO: we should not delay for such a long time.
 			   Ask SD3 */
-			usleep_range(1000, 1000);
+			usleep_range(1000, 2000);
 			reg = rtl8192_phy_QueryRFReg(dev, eRFPath,
 						     WriteAddr[HW90_BLOCK_RF],
 						     bMask12Bits);
-			usleep_range(1000, 1000);
+			usleep_range(1000, 2000);
 			break;
 
 		default:
@@ -846,7 +841,6 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 	priv->bCckHighPower = (u8)rtl8192_QueryBBReg(dev,
 						     rFPGA0_XA_HSSIParameter2,
 						     0x200);
-	return;
 }
 
 /******************************************************************************
@@ -864,7 +858,6 @@ void rtl8192_BBConfig(struct net_device *dev)
 	 * implemented, so use file first.
 	 * FIXME: should implement it for hardcode? */
 	rtl8192_BB_Config_ParaFile(dev);
-	return;
 }
 
 
@@ -907,13 +900,11 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 	read_nic_byte(dev, rOFDM0_RxDetector3, &priv->framesync);
 	read_nic_byte(dev, rOFDM0_RxDetector2, &tmp);
 	priv->framesyncC34 = tmp;
-	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x \n",
+	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n",
 		rOFDM0_RxDetector3, priv->framesync);
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
 	read_nic_word(dev, SIFS, &priv->SifsTime);
-
-	return;
 }
 
 /******************************************************************************
@@ -942,7 +933,6 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)
 			 __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -956,14 +946,13 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	switch (priv->rf_chip) {
-		case RF_8256:
-			PHY_RF8256_Config(dev);
-			break;
-		default:
-			RT_TRACE(COMP_ERR, "error chip id\n");
-			break;
+	case RF_8256:
+		PHY_RF8256_Config(dev);
+		break;
+	default:
+		RT_TRACE(COMP_ERR, "error chip id\n");
+		break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -974,7 +963,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
  ******************************************************************************/
 void rtl8192_phy_updateInitGain(struct net_device *dev)
 {
-	return;
 }
 
 /******************************************************************************
@@ -1094,7 +1082,6 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
 		RT_TRACE(COMP_ERR, "unknown rf chip ID in %s()\n", __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -1190,10 +1177,12 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
 				/* If Rf off reason is from IPS,
 				   LED should blink with no link */
 				if (pMgntInfo->RfOffReason == RF_CHANGE_BY_IPS)
-					Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK);
+					Adapter->HalFunc.LedControlHandler
+					(Adapter, LED_CTL_NO_LINK);
 				else
 					/* Turn off LED if RF is not ON. */
-					Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_POWER_OFF);
+					Adapter->HalFunc.LedControlHandler
+					(Adapter, LED_CTL_POWER_OFF);
 				break;
 
 			case eRfOn:
@@ -1201,10 +1190,12 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
 				   happen when we quickly turn off and on HW RF.
 				 */
 				if (pMgntInfo->bMediaConnect == TRUE)
-					Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_LINK);
+					Adapter->HalFunc.LedControlHandler
+					(Adapter, LED_CTL_LINK);
 				else
 					/* Turn off LED if RF is not ON. */
-					Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK);
+					Adapter->HalFunc.LedControlHandler
+					(Adapter, LED_CTL_NO_LINK);
 				break;
 
 			default:
@@ -1249,7 +1240,8 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
 		return false;
 	}
 	if (CmdTableIdx >= CmdTableSz) {
-		RT_TRACE(COMP_ERR, "%s(): Access invalid index, please check size of the table, CmdTableIdx:%d, CmdTableSz:%d\n",
+		RT_TRACE(COMP_ERR,
+			 "%s():invalid index,CmdTableIdx:%d, CmdTableSz:%d\n",
 			 __func__, CmdTableIdx, CmdTableSz);
 		return false;
 	}
@@ -1476,6 +1468,7 @@ void rtl8192_SwChnl_WorkItem(struct net_device *dev)
 u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	RT_TRACE(COMP_CH, "%s(), SwChnlInProgress: %d\n", __func__,
 		 priv->SwChnlInProgress);
 	if (!priv->up)
@@ -1709,7 +1702,8 @@ void InitialGain819xUsb(struct net_device *dev,	u8 Operation)
 	priv->InitialGainOperateType = Operation;
 
 	if (priv->up)
-		queue_delayed_work(priv->priv_wq, &priv->initialgain_operate_wq, 0);
+		queue_delayed_work(priv->priv_wq,
+				   &priv->initialgain_operate_wq, 0);
 }
 
 void InitialGainOperateWorkItemCallBack(struct work_struct *work)
@@ -1758,13 +1752,13 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan InitialGainBackup 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x\n",
 			 initial_gain);
 		write_nic_byte(dev, rOFDM0_XAAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XBAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XCAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XDAGCCore1, initial_gain);
-		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x\n",
 			 POWER_DETECTION_TH);
 		write_nic_byte(dev, 0xa0a, POWER_DETECTION_TH);
 		break;
@@ -1798,14 +1792,16 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		rtl8192_phy_setTxPower(dev, priv->ieee80211->current_network.channel);
+		rtl8192_phy_setTxPower(dev,
+				       priv->ieee80211->current_network.channel
+				       );
 
 		if (dm_digtable.dig_algorithm == DIG_ALGO_BY_FALSE_ALARM)
 			/* FW DIG ON */
 			rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x1);
 		break;
 	default:
-		RT_TRACE(COMP_SCAN, "Unknown IG Operation. \n");
+		RT_TRACE(COMP_SCAN, "Unknown IG Operation.\n");
 		break;
 	}
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH] staging: rtl8192u: fix checkpatch error/warning in r819xU_phy.c
  2014-07-08  6:04 [PATCH] staging: rtl8192u: fix checkpatch error/warning in r819xU_phy.c sanjeev sharma
@ 2014-07-08  7:43 ` Dan Carpenter
       [not found]   ` <CAGUYZuQgpNQRRg5X_AYv_iW5W60EdEwo0VOe3EJAPJocKrTf3g@mail.gmail.com>
  0 siblings, 1 reply; 27+ messages in thread
From: Dan Carpenter @ 2014-07-08  7:43 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: gregkh, devel, rmfrfs, peter.senna, linux-kernel, Sanjeev Sharma

On Tue, Jul 08, 2014 at 11:34:18AM +0530, sanjeev sharma wrote:
> From: sanjeevs1 <sanjeev_sharma@mentor.com>
        ^^^^^^^^^
No.

> 
> This is a patch to the r819xU_phy.c file that fixes up all the Error/Warning found by the checkpatch.pl tool

Split it into one thing per patch.

> 
> Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
> ---
>  drivers/staging/rtl8192u/r819xU_phy.c | 76 +++++++++++++++++------------------
>  1 file changed, 36 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
> index 02554c9..1dd1c1e 100644
> --- a/drivers/staging/rtl8192u/r819xU_phy.c
> +++ b/drivers/staging/rtl8192u/r819xU_phy.c
> @@ -101,16 +101,15 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
>  	} else {
>  		write_nic_dword(dev, reg_addr, data);
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
>   * function:  This function reads specific bits from BB register
>   * input:     net_device	*dev
> - *            u32	 	reg_addr   //target addr to be readback
> - *            u32	 	bitmask    //taget bit pos to be readback
> - * output:    none
> - * return:    u32	 	data       //the readback register value
> + * u32		reg_addr   //target addr to be readback
> + * u32		bitmask    //taget bit pos to be readback
> + * output:	none
> + * return:	u32		data       //the readback register value
>   * notice:
>   ******************************************************************************/
>  u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
> @@ -192,7 +191,7 @@ static u32 rtl8192_phy_RFSerialRead(struct net_device *dev,
>  
>  
>  	/* TODO: we should not delay such a long time. Ask for help from SD3 */
> -	usleep_range(1000, 1000);
> +	usleep_range(1000, 2000);

No.

>  
>  	ret = rtl8192_QueryBBReg(dev, pPhyReg->rfLSSIReadBack,
>  				 bLSSIReadBackData);
> @@ -281,7 +280,6 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
>  					 priv->RfReg0Value[eRFPath] << 16);
>  		}
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -332,7 +330,6 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
>  			rtl8192_phy_RFSerialWrite(dev, eRFPath, reg_addr, data);
>  		}
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -481,9 +478,9 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
>  /******************************************************************************
>   * function:  This function reads BB parameters from header file we generate,
>   *            and do register read/write
> - * input:     net_device 	*dev
> - * output:    none
> - * return:    none
> + * input:	net_device	*dev
> + * output:	none
> + * return:	none
>   * notice:    BB parameters may change all the time, so please make
>   *            sure it has been synced with the newest.
>   *****************************************************************************/
> @@ -513,7 +510,6 @@ void rtl8192_phy_configmac(struct net_device *dev)
>  		rtl8192_setBBreg(dev, pdwArray[i], pdwArray[i+1],
>  				 pdwArray[i+2]);
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -559,7 +555,6 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
>  				 rtl819XAGCTAB_Array[i+1]);
>  		}
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -746,11 +741,11 @@ u8 rtl8192_phy_checkBBAndRF(struct net_device *dev, HW90_BLOCK_E CheckBlock,
>  					     bMask12Bits, WriteData[i]);
>  			/* TODO: we should not delay for such a long time.
>  			   Ask SD3 */
> -			usleep_range(1000, 1000);
> +			usleep_range(1000, 2000);
>  			reg = rtl8192_phy_QueryRFReg(dev, eRFPath,
>  						     WriteAddr[HW90_BLOCK_RF],
>  						     bMask12Bits);
> -			usleep_range(1000, 1000);
> +			usleep_range(1000, 2000);

Don't do this without a better explanation and testing.

>  			break;
>  
>  		default:
> @@ -846,7 +841,6 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
>  	priv->bCckHighPower = (u8)rtl8192_QueryBBReg(dev,
>  						     rFPGA0_XA_HSSIParameter2,
>  						     0x200);
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -864,7 +858,6 @@ void rtl8192_BBConfig(struct net_device *dev)
>  	 * implemented, so use file first.
>  	 * FIXME: should implement it for hardcode? */
>  	rtl8192_BB_Config_ParaFile(dev);
> -	return;
>  }
>  
>  
> @@ -907,13 +900,11 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
>  	read_nic_byte(dev, rOFDM0_RxDetector3, &priv->framesync);
>  	read_nic_byte(dev, rOFDM0_RxDetector2, &tmp);
>  	priv->framesyncC34 = tmp;
> -	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x \n",
> +	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n",
>  		rOFDM0_RxDetector3, priv->framesync);
>  
>  	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
>  	read_nic_word(dev, SIFS, &priv->SifsTime);
> -
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -942,7 +933,6 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)
>  			 __func__);
>  		break;
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -956,14 +946,13 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
>  	struct r8192_priv *priv = ieee80211_priv(dev);
>  
>  	switch (priv->rf_chip) {
> -		case RF_8256:
> -			PHY_RF8256_Config(dev);
> -			break;
> -		default:
> -			RT_TRACE(COMP_ERR, "error chip id\n");
> -			break;
> +	case RF_8256:
> +		PHY_RF8256_Config(dev);
> +		break;
> +	default:
> +		RT_TRACE(COMP_ERR, "error chip id\n");
> +		break;
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -974,7 +963,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
>   ******************************************************************************/
>  void rtl8192_phy_updateInitGain(struct net_device *dev)
>  {
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -1094,7 +1082,6 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
>  		RT_TRACE(COMP_ERR, "unknown rf chip ID in %s()\n", __func__);
>  		break;
>  	}
> -	return;
>  }
>  
>  /******************************************************************************
> @@ -1190,10 +1177,12 @@ bool rtl8192_SetRFPowerState(struct net_device *dev,
>  				/* If Rf off reason is from IPS,
>  				   LED should blink with no link */
>  				if (pMgntInfo->RfOffReason == RF_CHANGE_BY_IPS)
> -					Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK);
> +					Adapter->HalFunc.LedControlHandler
> +					(Adapter, LED_CTL_NO_LINK);

The original was more readable.

>  				else
>  					/* Turn off LED if RF is not ON. */
> -					Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_POWER_OFF);
> +					Adapter->HalFunc.LedControlHandler
> +					(Adapter, LED_CTL_POWER_OFF);

No.

regards,
dan carpenter



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] staging: rtl8192u: fix checkpatch error/warning in r819xU_phy.c
       [not found]   ` <CAGUYZuQgpNQRRg5X_AYv_iW5W60EdEwo0VOe3EJAPJocKrTf3g@mail.gmail.com>
@ 2014-07-08 10:01     ` Dan Carpenter
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
                         ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Dan Carpenter @ 2014-07-08 10:01 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: gregkh, devel, rmfrfs, peter.senna, linux-kernel, Sanjeev Sharma

On Tue, Jul 08, 2014 at 03:18:40PM +0530, sanjeev sharma wrote:
> Hi Dan,
> 
> 
> On Tue, Jul 8, 2014 at 1:13 PM, Dan Carpenter <dan.carpenter@oracle.com>
> wrote:
> 
> > On Tue, Jul 08, 2014 at 11:34:18AM +0530, sanjeev sharma wrote:
> > > From: sanjeevs1 <sanjeev_sharma@mentor.com>
> >         ^^^^^^^^^
> > No.
> >
> > >
> > > This is a patch to the r819xU_phy.c file that fixes up all the
> > Error/Warning found by the checkpatch.pl tool
> >
> > Split it into one thing per patch.
> >
> 
> you mean to say Error and Warning should be fixed in separate patches ?

patch 1: remove useless returns
patch 2: too long lines
patch 3: fix sleep ranges
etc.

> > >       /* TODO: we should not delay such a long time. Ask for help from
> > SD3 */
> > > -     usleep_range(1000, 1000);
> > > +     usleep_range(1000, 2000);
> >
> > No.
> >
> > usleep_range(1000, 1001);
> Above could be best fit to resolve the checkpatch error because
> usleep_range() shouldn't use min ==max args; what you would suggest ?

Just leave it alone until someone who knows the answer and has the
hardware can change it.

> > Adapter->HalFunc.LedControlHandler(Adapter, LED_CTL_NO_LINK);
> > > +                                     Adapter->HalFunc.LedControlHandler
> > > +                                     (Adapter, LED_CTL_NO_LINK);
> >
> > The original was more readable.
> >
> Don't we need to focus on Warning rather then readability ?

No.  Readability first.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v2 0/4] Fix checkpatch reported problem in r819xU_phy.c
  2014-07-08 10:01     ` Dan Carpenter
@ 2014-07-09  6:04       ` sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement " sanjeev sharma
                           ` (3 more replies)
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
  2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
  2 siblings, 4 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09  6:04 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel, sanjeev sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

I have come up with seperate patch as per Dan comment.

sanjeev sharma (4):
  staging: rtl8192u: Remove useless return statement in r819xU_phy.c
  staging: rtl8192u: Removed unnecessary whitespace & tab warning  in
    r819xU_phy.c
  staging: rtl8192u: Fixed switch and case indentation error in
    r819xU_phy.c
  staging: rtl8192u: Fixed too long lines in r819xU_phy.c

 drivers/staging/rtl8192u/r819xU_phy.c | 58 +++++++++++++++--------------------
 1 file changed, 25 insertions(+), 33 deletions(-)

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement in r819xU_phy.c
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
@ 2014-07-09  6:04         ` sanjeev sharma
  2014-07-09  8:09           ` Dan Carpenter
  2014-07-09  6:04         ` [PATCH v2 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning " sanjeev sharma
                           ` (2 subsequent siblings)
  3 siblings, 1 reply; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09  6:04 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This is a patch to the r819xU_phy.c file that remove unneeded return statements in code.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
Changes in v2:
  - Remove useless return statement.
---
 drivers/staging/rtl8192u/r819xU_phy.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 02554c9..0bcdd4e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -101,7 +101,6 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 	} else {
 		write_nic_dword(dev, reg_addr, data);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -281,7 +280,6 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
 					 priv->RfReg0Value[eRFPath] << 16);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -332,7 +330,6 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
 			rtl8192_phy_RFSerialWrite(dev, eRFPath, reg_addr, data);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -513,7 +510,6 @@ void rtl8192_phy_configmac(struct net_device *dev)
 		rtl8192_setBBreg(dev, pdwArray[i], pdwArray[i+1],
 				 pdwArray[i+2]);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -559,7 +555,6 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
 				 rtl819XAGCTAB_Array[i+1]);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -846,7 +841,6 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 	priv->bCckHighPower = (u8)rtl8192_QueryBBReg(dev,
 						     rFPGA0_XA_HSSIParameter2,
 						     0x200);
-	return;
 }
 
 /******************************************************************************
@@ -864,7 +858,6 @@ void rtl8192_BBConfig(struct net_device *dev)
 	 * implemented, so use file first.
 	 * FIXME: should implement it for hardcode? */
 	rtl8192_BB_Config_ParaFile(dev);
-	return;
 }
 
 
@@ -912,8 +905,6 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
 	read_nic_word(dev, SIFS, &priv->SifsTime);
-
-	return;
 }
 
 /******************************************************************************
@@ -942,7 +933,6 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)
 			 __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -963,7 +953,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 			RT_TRACE(COMP_ERR, "error chip id\n");
 			break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -974,7 +963,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
  ******************************************************************************/
 void rtl8192_phy_updateInitGain(struct net_device *dev)
 {
-	return;
 }
 
 /******************************************************************************
@@ -1094,7 +1082,6 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
 		RT_TRACE(COMP_ERR, "unknown rf chip ID in %s()\n", __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning  in r819xU_phy.c
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement " sanjeev sharma
@ 2014-07-09  6:04         ` sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 3/4] staging: rtl8192u: Fixed switch and case indentation error " sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 4/4] staging: rtl8192u: Fixed too long lines " sanjeev sharma
  3 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09  6:04 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This is a patch to the r819xU_phy.c file that remove unnecessary  whitespace and tabs reported by checkpatch.pl script.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0bcdd4e..0fcb673 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -106,10 +106,10 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 /******************************************************************************
  * function:  This function reads specific bits from BB register
  * input:     net_device	*dev
- *            u32	 	reg_addr   //target addr to be readback
- *            u32	 	bitmask    //taget bit pos to be readback
- * output:    none
- * return:    u32	 	data       //the readback register value
+ * u32		reg_addr   //target addr to be readback
+ * u32		bitmask    //taget bit pos to be readback
+ * output:	none
+ * return:	u32		data       //the readback register value
  * notice:
  ******************************************************************************/
 u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
@@ -478,9 +478,9 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 /******************************************************************************
  * function:  This function reads BB parameters from header file we generate,
  *            and do register read/write
- * input:     net_device 	*dev
- * output:    none
- * return:    none
+ * input:	net_device	*dev
+ * output:	none
+ * return:	none
  * notice:    BB parameters may change all the time, so please make
  *            sure it has been synced with the newest.
  *****************************************************************************/
@@ -900,7 +900,7 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 	read_nic_byte(dev, rOFDM0_RxDetector3, &priv->framesync);
 	read_nic_byte(dev, rOFDM0_RxDetector2, &tmp);
 	priv->framesyncC34 = tmp;
-	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x \n",
+	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n",
 		rOFDM0_RxDetector3, priv->framesync);
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
@@ -1463,6 +1463,7 @@ void rtl8192_SwChnl_WorkItem(struct net_device *dev)
 u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	RT_TRACE(COMP_CH, "%s(), SwChnlInProgress: %d\n", __func__,
 		 priv->SwChnlInProgress);
 	if (!priv->up)
@@ -1745,13 +1746,13 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan InitialGainBackup 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x\n",
 			 initial_gain);
 		write_nic_byte(dev, rOFDM0_XAAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XBAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XCAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XDAGCCore1, initial_gain);
-		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x\n",
 			 POWER_DETECTION_TH);
 		write_nic_byte(dev, 0xa0a, POWER_DETECTION_TH);
 		break;
@@ -1792,7 +1793,7 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 			rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x1);
 		break;
 	default:
-		RT_TRACE(COMP_SCAN, "Unknown IG Operation. \n");
+		RT_TRACE(COMP_SCAN, "Unknown IG Operation.\n");
 		break;
 	}
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 3/4] staging: rtl8192u: Fixed switch and case indentation error in r819xU_phy.c
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement " sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning " sanjeev sharma
@ 2014-07-09  6:04         ` sanjeev sharma
  2014-07-09  6:04         ` [PATCH v2 4/4] staging: rtl8192u: Fixed too long lines " sanjeev sharma
  3 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09  6:04 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This is a patch to the r819xU_phy.c file that will fix switch and case indentation Error reported by checkpatch script.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0fcb673..3155616 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -946,12 +946,12 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	switch (priv->rf_chip) {
-		case RF_8256:
-			PHY_RF8256_Config(dev);
-			break;
-		default:
-			RT_TRACE(COMP_ERR, "error chip id\n");
-			break;
+	case RF_8256:
+		PHY_RF8256_Config(dev);
+		break;
+	default:
+		RT_TRACE(COMP_ERR, "error chip id\n");
+		break;
 	}
 }
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v2 4/4] staging: rtl8192u: Fixed too long lines in r819xU_phy.c
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
                           ` (2 preceding siblings ...)
  2014-07-09  6:04         ` [PATCH v2 3/4] staging: rtl8192u: Fixed switch and case indentation error " sanjeev sharma
@ 2014-07-09  6:04         ` sanjeev sharma
  3 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09  6:04 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This is a patch to the r819xU_phy.c file that will fix too long lines warning reported by checkpatch.pl .

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 3155616..1ea3a4e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1236,7 +1236,8 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
 		return false;
 	}
 	if (CmdTableIdx >= CmdTableSz) {
-		RT_TRACE(COMP_ERR, "%s(): Access invalid index, please check size of the table, CmdTableIdx:%d, CmdTableSz:%d\n",
+		RT_TRACE(COMP_ERR,
+			 "%s():invalid index,CmdTableIdx:%d, CmdTableSz:%d\n",
 			 __func__, CmdTableIdx, CmdTableSz);
 		return false;
 	}
@@ -1697,7 +1698,8 @@ void InitialGain819xUsb(struct net_device *dev,	u8 Operation)
 	priv->InitialGainOperateType = Operation;
 
 	if (priv->up)
-		queue_delayed_work(priv->priv_wq, &priv->initialgain_operate_wq, 0);
+		queue_delayed_work(priv->priv_wq,
+				   &priv->initialgain_operate_wq, 0);
 }
 
 void InitialGainOperateWorkItemCallBack(struct work_struct *work)
@@ -1786,7 +1788,9 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		rtl8192_phy_setTxPower(dev, priv->ieee80211->current_network.channel);
+		rtl8192_phy_setTxPower(dev,
+					priv->ieee80211->current_network.channel
+				       );
 
 		if (dm_digtable.dig_algorithm == DIG_ALGO_BY_FALSE_ALARM)
 			/* FW DIG ON */
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement in r819xU_phy.c
  2014-07-09  6:04         ` [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement " sanjeev sharma
@ 2014-07-09  8:09           ` Dan Carpenter
  2014-07-09 10:14             ` Sharma, Sanjeev
  0 siblings, 1 reply; 27+ messages in thread
From: Dan Carpenter @ 2014-07-09  8:09 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: gregkh, devel, peter.senna, linux-kernel, rmfrfs, teobaluta,
	Sanjeev Sharma

These patches look ok now.  The only thing is that the changelogs are
a little off.

On Wed, Jul 09, 2014 at 11:34:17AM +0530, sanjeev sharma wrote:
> From: sanjeev sharma <sanjeev_sharma@mentor.com>

Don't use the From header unless you are sending patches on behalf of
someone else.  It's better if you can configure your email client so you
can send the patches from your @mentor.com address.  It would be better
if the names were capitalized.

> 
> This is a patch to the r819xU_phy.c file that remove unneeded return statements in code.

Please line wrap the changelog at 72 characters (the same as email).
Otherwise Greg sometimes fixes them manually...

But the patches themselves are nice now.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement in r819xU_phy.c
  2014-07-09  8:09           ` Dan Carpenter
@ 2014-07-09 10:14             ` Sharma, Sanjeev
  0 siblings, 0 replies; 27+ messages in thread
From: Sharma, Sanjeev @ 2014-07-09 10:14 UTC (permalink / raw)
  To: Dan Carpenter, sanjeev sharma
  Cc: gregkh, devel, peter.senna, linux-kernel, rmfrfs, teobaluta

Thanks Dan,


-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@oracle.com] 
Sent: Wednesday, July 09, 2014 1:40 PM
To: sanjeev sharma
Cc: gregkh@linuxfoundation.org; devel@driverdev.osuosl.org; peter.senna@gmail.com; linux-kernel@vger.kernel.org; rmfrfs@gmail.com; teobaluta@gmail.com; Sharma, Sanjeev
Subject: Re: [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement in r819xU_phy.c

These patches look ok now.  The only thing is that the changelogs are a little off.

On Wed, Jul 09, 2014 at 11:34:17AM +0530, sanjeev sharma wrote:
> From: sanjeev sharma <sanjeev_sharma@mentor.com>

Don't use the From header unless you are sending patches on behalf of someone else.  It's better if you can configure your email client so you can send the patches from your @mentor.com address.  It would be better if the names were capitalized.

I will take care for future patches and configure email client by using mentor address.

> 
> This is a patch to the r819xU_phy.c file that remove unneeded return statements in code.

Please line wrap the changelog at 72 characters (the same as email).
Otherwise Greg sometimes fixes them manually...

But the patches themselves are nice now.

@Greg.,@Dan: Is it Ok if this can be taken care in future.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v3 0/4] line wrapping of changelog
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
@ 2014-07-09 12:15         ` Dan Carpenter
  2014-07-09 12:19         ` [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements sanjeev sharma
                           ` (3 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Dan Carpenter @ 2014-07-09 12:15 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: gregkh, devel, rmfrfs, teobaluta, peter.senna, linux-kernel

Great.  Thanks!

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v3 0/4] line wrapping of changelog
  2014-07-08 10:01     ` Dan Carpenter
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
@ 2014-07-09 12:19       ` sanjeev sharma
  2014-07-09 12:15         ` Dan Carpenter
                           ` (4 more replies)
  2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
  2 siblings, 5 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09 12:19 UTC (permalink / raw)
  To: gregkh; +Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel

line wrap the changelog as per Dan

sanjeev sharma (4):
  staging: rtl8192u: Remove useless return statements.
  staging: rtl8192u: Removed unnecessary whitespace & tab warning.
  staging: rtl8192u: Fixed switch and case indentation error.
  staging: rtl8192u: Fixed too long lines

 drivers/staging/rtl8192u/r819xU_phy.c | 58 +++++++++++++++--------------------
 1 file changed, 25 insertions(+), 33 deletions(-)

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements.
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
  2014-07-09 12:15         ` Dan Carpenter
@ 2014-07-09 12:19         ` sanjeev sharma
  2014-07-09 19:24           ` Greg KH
  2014-07-09 12:19         ` [PATCH v3 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
                           ` (2 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09 12:19 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will remove unneeded return statements in
code.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 02554c9..0bcdd4e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -101,7 +101,6 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 	} else {
 		write_nic_dword(dev, reg_addr, data);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -281,7 +280,6 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
 					 priv->RfReg0Value[eRFPath] << 16);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -332,7 +330,6 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
 			rtl8192_phy_RFSerialWrite(dev, eRFPath, reg_addr, data);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -513,7 +510,6 @@ void rtl8192_phy_configmac(struct net_device *dev)
 		rtl8192_setBBreg(dev, pdwArray[i], pdwArray[i+1],
 				 pdwArray[i+2]);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -559,7 +555,6 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
 				 rtl819XAGCTAB_Array[i+1]);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -846,7 +841,6 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 	priv->bCckHighPower = (u8)rtl8192_QueryBBReg(dev,
 						     rFPGA0_XA_HSSIParameter2,
 						     0x200);
-	return;
 }
 
 /******************************************************************************
@@ -864,7 +858,6 @@ void rtl8192_BBConfig(struct net_device *dev)
 	 * implemented, so use file first.
 	 * FIXME: should implement it for hardcode? */
 	rtl8192_BB_Config_ParaFile(dev);
-	return;
 }
 
 
@@ -912,8 +905,6 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
 	read_nic_word(dev, SIFS, &priv->SifsTime);
-
-	return;
 }
 
 /******************************************************************************
@@ -942,7 +933,6 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)
 			 __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -963,7 +953,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 			RT_TRACE(COMP_ERR, "error chip id\n");
 			break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -974,7 +963,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
  ******************************************************************************/
 void rtl8192_phy_updateInitGain(struct net_device *dev)
 {
-	return;
 }
 
 /******************************************************************************
@@ -1094,7 +1082,6 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
 		RT_TRACE(COMP_ERR, "unknown rf chip ID in %s()\n", __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v3 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning.
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
  2014-07-09 12:15         ` Dan Carpenter
  2014-07-09 12:19         ` [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements sanjeev sharma
@ 2014-07-09 12:19         ` sanjeev sharma
  2014-07-09 12:19         ` [PATCH v3 3/4] staging: rtl8192u: Fixed switch and case indentation error sanjeev sharma
  2014-07-09 12:19         ` [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines sanjeev sharma
  4 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09 12:19 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will remove whitespace and tabs reported by
checkpatch.pl script.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0bcdd4e..0fcb673 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -106,10 +106,10 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 /******************************************************************************
  * function:  This function reads specific bits from BB register
  * input:     net_device	*dev
- *            u32	 	reg_addr   //target addr to be readback
- *            u32	 	bitmask    //taget bit pos to be readback
- * output:    none
- * return:    u32	 	data       //the readback register value
+ * u32		reg_addr   //target addr to be readback
+ * u32		bitmask    //taget bit pos to be readback
+ * output:	none
+ * return:	u32		data       //the readback register value
  * notice:
  ******************************************************************************/
 u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
@@ -478,9 +478,9 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 /******************************************************************************
  * function:  This function reads BB parameters from header file we generate,
  *            and do register read/write
- * input:     net_device 	*dev
- * output:    none
- * return:    none
+ * input:	net_device	*dev
+ * output:	none
+ * return:	none
  * notice:    BB parameters may change all the time, so please make
  *            sure it has been synced with the newest.
  *****************************************************************************/
@@ -900,7 +900,7 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 	read_nic_byte(dev, rOFDM0_RxDetector3, &priv->framesync);
 	read_nic_byte(dev, rOFDM0_RxDetector2, &tmp);
 	priv->framesyncC34 = tmp;
-	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x \n",
+	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n",
 		rOFDM0_RxDetector3, priv->framesync);
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
@@ -1463,6 +1463,7 @@ void rtl8192_SwChnl_WorkItem(struct net_device *dev)
 u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	RT_TRACE(COMP_CH, "%s(), SwChnlInProgress: %d\n", __func__,
 		 priv->SwChnlInProgress);
 	if (!priv->up)
@@ -1745,13 +1746,13 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan InitialGainBackup 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x\n",
 			 initial_gain);
 		write_nic_byte(dev, rOFDM0_XAAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XBAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XCAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XDAGCCore1, initial_gain);
-		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x\n",
 			 POWER_DETECTION_TH);
 		write_nic_byte(dev, 0xa0a, POWER_DETECTION_TH);
 		break;
@@ -1792,7 +1793,7 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 			rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x1);
 		break;
 	default:
-		RT_TRACE(COMP_SCAN, "Unknown IG Operation. \n");
+		RT_TRACE(COMP_SCAN, "Unknown IG Operation.\n");
 		break;
 	}
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v3 3/4] staging: rtl8192u: Fixed switch and case indentation error.
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
                           ` (2 preceding siblings ...)
  2014-07-09 12:19         ` [PATCH v3 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
@ 2014-07-09 12:19         ` sanjeev sharma
  2014-07-09 12:19         ` [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines sanjeev sharma
  4 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09 12:19 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will fix switch and case indentation Error
reported by checkpatch script.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0fcb673..3155616 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -946,12 +946,12 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	switch (priv->rf_chip) {
-		case RF_8256:
-			PHY_RF8256_Config(dev);
-			break;
-		default:
-			RT_TRACE(COMP_ERR, "error chip id\n");
-			break;
+	case RF_8256:
+		PHY_RF8256_Config(dev);
+		break;
+	default:
+		RT_TRACE(COMP_ERR, "error chip id\n");
+		break;
 	}
 }
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
                           ` (3 preceding siblings ...)
  2014-07-09 12:19         ` [PATCH v3 3/4] staging: rtl8192u: Fixed switch and case indentation error sanjeev sharma
@ 2014-07-09 12:19         ` sanjeev sharma
  2014-07-09 12:56           ` Joe Perches
  4 siblings, 1 reply; 27+ messages in thread
From: sanjeev sharma @ 2014-07-09 12:19 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will fix too long lines warning
reported by checkpatch.pl.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 3155616..1ea3a4e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1236,7 +1236,8 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
 		return false;
 	}
 	if (CmdTableIdx >= CmdTableSz) {
-		RT_TRACE(COMP_ERR, "%s(): Access invalid index, please check size of the table, CmdTableIdx:%d, CmdTableSz:%d\n",
+		RT_TRACE(COMP_ERR,
+			 "%s():invalid index,CmdTableIdx:%d, CmdTableSz:%d\n",
 			 __func__, CmdTableIdx, CmdTableSz);
 		return false;
 	}
@@ -1697,7 +1698,8 @@ void InitialGain819xUsb(struct net_device *dev,	u8 Operation)
 	priv->InitialGainOperateType = Operation;
 
 	if (priv->up)
-		queue_delayed_work(priv->priv_wq, &priv->initialgain_operate_wq, 0);
+		queue_delayed_work(priv->priv_wq,
+				   &priv->initialgain_operate_wq, 0);
 }
 
 void InitialGainOperateWorkItemCallBack(struct work_struct *work)
@@ -1786,7 +1788,9 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		rtl8192_phy_setTxPower(dev, priv->ieee80211->current_network.channel);
+		rtl8192_phy_setTxPower(dev,
+					priv->ieee80211->current_network.channel
+				       );
 
 		if (dm_digtable.dig_algorithm == DIG_ALGO_BY_FALSE_ALARM)
 			/* FW DIG ON */
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines
  2014-07-09 12:19         ` [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines sanjeev sharma
@ 2014-07-09 12:56           ` Joe Perches
  2014-07-10 12:18             ` Sharma, Sanjeev
  0 siblings, 1 reply; 27+ messages in thread
From: Joe Perches @ 2014-07-09 12:56 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: gregkh, rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma

On Wed, 2014-07-09 at 17:49 +0530, sanjeev sharma wrote:
> This patch will fix too long lines warning
> reported by checkpatch.pl.

Hi Sanjeev.

> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
[]
> @@ -1786,7 +1788,9 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
>  		RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
>  			 priv->initgain_backup.cca);
>  
> -		rtl8192_phy_setTxPower(dev, priv->ieee80211->current_network.channel);
> +		rtl8192_phy_setTxPower(dev,
> +					priv->ieee80211->current_network.channel
> +				       );

This one is a little off

+		rtl8192_phy_setTxPower(dev,
+					priv->ieee80211->current_network.channel
+				       );

Please align multiline statements to the appropriate
open parenthesis using a mix of initial leading tabs
followed by the minimal number of spaces required
to put the first non-whitespace char at the column
immediately after the preceding open paren.

Here it's 4 tabs, 7 spaces, not 5 tabs:

+		rtl8192_phy_setTxPower(dev,
+				       priv->ieee80211->current_network.channel);

And please don't use a line that's just a close
parenthesis and semicolon.

I think it's better to ignore the 80 column limit for
these and place them at the end of the preceding line.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements.
  2014-07-09 12:19         ` [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements sanjeev sharma
@ 2014-07-09 19:24           ` Greg KH
  2014-07-10 12:19             ` Sharma, Sanjeev
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2014-07-09 19:24 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: devel, peter.senna, linux-kernel, rmfrfs, teobaluta, Sanjeev Sharma

On Wed, Jul 09, 2014 at 05:49:39PM +0530, sanjeev sharma wrote:
> From: sanjeev sharma <sanjeev_sharma@mentor.com>

No "S" characters?

And your 0/4 Subject: was really odd, please fix up and resend all of
these.

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines
  2014-07-09 12:56           ` Joe Perches
@ 2014-07-10 12:18             ` Sharma, Sanjeev
  0 siblings, 0 replies; 27+ messages in thread
From: Sharma, Sanjeev @ 2014-07-10 12:18 UTC (permalink / raw)
  To: Joe Perches, sanjeev sharma
  Cc: gregkh, rmfrfs, peter.senna, teobaluta, devel, linux-kernel

Hi Joe,

I have incorporated your review comment  in version v4.

Regards
Sanjeev Sharma 

-----Original Message-----
From: Joe Perches [mailto:joe@perches.com] 
Sent: Wednesday, July 09, 2014 6:27 PM
To: sanjeev sharma
Cc: gregkh@linuxfoundation.org; rmfrfs@gmail.com; peter.senna@gmail.com; teobaluta@gmail.com; devel@driverdev.osuosl.org; linux-kernel@vger.kernel.org; Sharma, Sanjeev
Subject: Re: [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines

On Wed, 2014-07-09 at 17:49 +0530, sanjeev sharma wrote:
> This patch will fix too long lines warning reported by checkpatch.pl.

Hi Sanjeev.

> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c 
> b/drivers/staging/rtl8192u/r819xU_phy.c
[]
> @@ -1786,7 +1788,9 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
>  		RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
>  			 priv->initgain_backup.cca);
>  
> -		rtl8192_phy_setTxPower(dev, priv->ieee80211->current_network.channel);
> +		rtl8192_phy_setTxPower(dev,
> +					priv->ieee80211->current_network.channel
> +				       );

This one is a little off

+		rtl8192_phy_setTxPower(dev,
+					priv->ieee80211->current_network.channel
+				       );

Please align multiline statements to the appropriate open parenthesis using a mix of initial leading tabs followed by the minimal number of spaces required to put the first non-whitespace char at the column immediately after the preceding open paren.

Here it's 4 tabs, 7 spaces, not 5 tabs:

+		rtl8192_phy_setTxPower(dev,
+				       priv->ieee80211->current_network.channel);

And please don't use a line that's just a close parenthesis and semicolon.

I think it's better to ignore the 80 column limit for these and place them at the end of the preceding line.



^ permalink raw reply	[flat|nested] 27+ messages in thread

* RE: [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements.
  2014-07-09 19:24           ` Greg KH
@ 2014-07-10 12:19             ` Sharma, Sanjeev
  0 siblings, 0 replies; 27+ messages in thread
From: Sharma, Sanjeev @ 2014-07-10 12:19 UTC (permalink / raw)
  To: Greg KH, sanjeev sharma
  Cc: devel, peter.senna, linux-kernel, rmfrfs, teobaluta

Thanks Greg for review.

Change has been just pushed now with version 4.

Regards
Sanjeev Sharma

-----Original Message-----
From: Greg KH [mailto:gregkh@linuxfoundation.org] 
Sent: Thursday, July 10, 2014 12:55 AM
To: sanjeev sharma
Cc: devel@driverdev.osuosl.org; peter.senna@gmail.com; linux-kernel@vger.kernel.org; rmfrfs@gmail.com; teobaluta@gmail.com; Sharma, Sanjeev
Subject: Re: [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements.

On Wed, Jul 09, 2014 at 05:49:39PM +0530, sanjeev sharma wrote:
> From: sanjeev sharma <sanjeev_sharma@mentor.com>

No "S" characters?

And your 0/4 Subject: was really odd, please fix up and resend all of these.

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes
  2014-07-08 10:01     ` Dan Carpenter
  2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
  2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
@ 2014-07-10 12:24       ` sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 1/4] staging: rtl8192u: Remove useless return statement sanjeev sharma
                           ` (3 more replies)
  2 siblings, 4 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-10 12:24 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel, sanjeev sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This version of patch incorporated Joe & Greg KH review comment.

sanjeev sharma (4):
  staging: rtl8192u: Remove useless return statement
  staging: rtl8192u: Removed unnecessary whitespace & tab warning
  staging: rtl8192u: Fixed switch and case indentation error
  staging: rtl8192u: Fixed too long line

 drivers/staging/rtl8192u/r819xU_phy.c | 57 +++++++++++++++--------------------
 1 file changed, 24 insertions(+), 33 deletions(-)

-- 
1.7.11.7


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH v4 1/4] staging: rtl8192u: Remove useless return statement
  2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
@ 2014-07-10 12:24         ` sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-10 12:24 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will remove unneeded return statements in
code.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 02554c9..0bcdd4e 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -101,7 +101,6 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 	} else {
 		write_nic_dword(dev, reg_addr, data);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -281,7 +280,6 @@ static void rtl8192_phy_RFSerialWrite(struct net_device *dev,
 					 priv->RfReg0Value[eRFPath] << 16);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -332,7 +330,6 @@ void rtl8192_phy_SetRFReg(struct net_device *dev, RF90_RADIO_PATH_E eRFPath,
 			rtl8192_phy_RFSerialWrite(dev, eRFPath, reg_addr, data);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -513,7 +510,6 @@ void rtl8192_phy_configmac(struct net_device *dev)
 		rtl8192_setBBreg(dev, pdwArray[i], pdwArray[i+1],
 				 pdwArray[i+2]);
 	}
-	return;
 }
 
 /******************************************************************************
@@ -559,7 +555,6 @@ void rtl8192_phyConfigBB(struct net_device *dev, u8 ConfigType)
 				 rtl819XAGCTAB_Array[i+1]);
 		}
 	}
-	return;
 }
 
 /******************************************************************************
@@ -846,7 +841,6 @@ static void rtl8192_BB_Config_ParaFile(struct net_device *dev)
 	priv->bCckHighPower = (u8)rtl8192_QueryBBReg(dev,
 						     rFPGA0_XA_HSSIParameter2,
 						     0x200);
-	return;
 }
 
 /******************************************************************************
@@ -864,7 +858,6 @@ void rtl8192_BBConfig(struct net_device *dev)
 	 * implemented, so use file first.
 	 * FIXME: should implement it for hardcode? */
 	rtl8192_BB_Config_ParaFile(dev);
-	return;
 }
 
 
@@ -912,8 +905,6 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
 	read_nic_word(dev, SIFS, &priv->SifsTime);
-
-	return;
 }
 
 /******************************************************************************
@@ -942,7 +933,6 @@ void rtl8192_phy_setTxPower(struct net_device *dev, u8 channel)
 			 __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -963,7 +953,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 			RT_TRACE(COMP_ERR, "error chip id\n");
 			break;
 	}
-	return;
 }
 
 /******************************************************************************
@@ -974,7 +963,6 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
  ******************************************************************************/
 void rtl8192_phy_updateInitGain(struct net_device *dev)
 {
-	return;
 }
 
 /******************************************************************************
@@ -1094,7 +1082,6 @@ static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
 		RT_TRACE(COMP_ERR, "unknown rf chip ID in %s()\n", __func__);
 		break;
 	}
-	return;
 }
 
 /******************************************************************************
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning
  2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 1/4] staging: rtl8192u: Remove useless return statement sanjeev sharma
@ 2014-07-10 12:24         ` sanjeev sharma
  2014-07-10 22:15           ` Greg KH
  2014-07-10 12:24         ` [PATCH v4 3/4] staging: rtl8192u: Fixed switch and case indentation error sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 4/4] staging: rtl8192u: Fixed too long line sanjeev sharma
  3 siblings, 1 reply; 27+ messages in thread
From: sanjeev sharma @ 2014-07-10 12:24 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will remove whitespace and tabs reported by
checkpatch.pl script.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0bcdd4e..0fcb673 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -106,10 +106,10 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
 /******************************************************************************
  * function:  This function reads specific bits from BB register
  * input:     net_device	*dev
- *            u32	 	reg_addr   //target addr to be readback
- *            u32	 	bitmask    //taget bit pos to be readback
- * output:    none
- * return:    u32	 	data       //the readback register value
+ * u32		reg_addr   //target addr to be readback
+ * u32		bitmask    //taget bit pos to be readback
+ * output:	none
+ * return:	u32		data       //the readback register value
  * notice:
  ******************************************************************************/
 u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)
@@ -478,9 +478,9 @@ static void phy_FwRFSerialWrite(struct net_device *dev,
 /******************************************************************************
  * function:  This function reads BB parameters from header file we generate,
  *            and do register read/write
- * input:     net_device 	*dev
- * output:    none
- * return:    none
+ * input:	net_device	*dev
+ * output:	none
+ * return:	none
  * notice:    BB parameters may change all the time, so please make
  *            sure it has been synced with the newest.
  *****************************************************************************/
@@ -900,7 +900,7 @@ void rtl8192_phy_getTxPower(struct net_device *dev)
 	read_nic_byte(dev, rOFDM0_RxDetector3, &priv->framesync);
 	read_nic_byte(dev, rOFDM0_RxDetector2, &tmp);
 	priv->framesyncC34 = tmp;
-	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x \n",
+	RT_TRACE(COMP_INIT, "Default framesync (0x%x) = 0x%x\n",
 		rOFDM0_RxDetector3, priv->framesync);
 
 	/* Read SIFS (save the value read fome MACPHY_REG.txt) */
@@ -1463,6 +1463,7 @@ void rtl8192_SwChnl_WorkItem(struct net_device *dev)
 u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel)
 {
 	struct r8192_priv *priv = ieee80211_priv(dev);
+
 	RT_TRACE(COMP_CH, "%s(), SwChnlInProgress: %d\n", __func__,
 		 priv->SwChnlInProgress);
 	if (!priv->up)
@@ -1745,13 +1746,13 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan InitialGainBackup 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan initial gain = 0x%x\n",
 			 initial_gain);
 		write_nic_byte(dev, rOFDM0_XAAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XBAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XCAGCCore1, initial_gain);
 		write_nic_byte(dev, rOFDM0_XDAGCCore1, initial_gain);
-		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x \n",
+		RT_TRACE(COMP_SCAN, "Write scan 0xa0a = 0x%x\n",
 			 POWER_DETECTION_TH);
 		write_nic_byte(dev, 0xa0a, POWER_DETECTION_TH);
 		break;
@@ -1792,7 +1793,7 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 			rtl8192_setBBreg(dev, UFWP, bMaskByte1, 0x1);
 		break;
 	default:
-		RT_TRACE(COMP_SCAN, "Unknown IG Operation. \n");
+		RT_TRACE(COMP_SCAN, "Unknown IG Operation.\n");
 		break;
 	}
 }
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 3/4] staging: rtl8192u: Fixed switch and case indentation error
  2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 1/4] staging: rtl8192u: Remove useless return statement sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
@ 2014-07-10 12:24         ` sanjeev sharma
  2014-07-10 12:24         ` [PATCH v4 4/4] staging: rtl8192u: Fixed too long line sanjeev sharma
  3 siblings, 0 replies; 27+ messages in thread
From: sanjeev sharma @ 2014-07-10 12:24 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will fix switch and case indentation Error
reported by checkpatch script.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 0fcb673..3155616 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -946,12 +946,12 @@ void rtl8192_phy_RFConfig(struct net_device *dev)
 	struct r8192_priv *priv = ieee80211_priv(dev);
 
 	switch (priv->rf_chip) {
-		case RF_8256:
-			PHY_RF8256_Config(dev);
-			break;
-		default:
-			RT_TRACE(COMP_ERR, "error chip id\n");
-			break;
+	case RF_8256:
+		PHY_RF8256_Config(dev);
+		break;
+	default:
+		RT_TRACE(COMP_ERR, "error chip id\n");
+		break;
 	}
 }
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* [PATCH v4 4/4] staging: rtl8192u: Fixed too long line
  2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
                           ` (2 preceding siblings ...)
  2014-07-10 12:24         ` [PATCH v4 3/4] staging: rtl8192u: Fixed switch and case indentation error sanjeev sharma
@ 2014-07-10 12:24         ` sanjeev sharma
  2014-07-10 22:16           ` Greg KH
  3 siblings, 1 reply; 27+ messages in thread
From: sanjeev sharma @ 2014-07-10 12:24 UTC (permalink / raw)
  To: gregkh
  Cc: rmfrfs, peter.senna, teobaluta, devel, linux-kernel,
	sanjeev sharma, Sanjeev Sharma

From: sanjeev sharma <sanjeev_sharma@mentor.com>

This patch will fix too long lines warning
reported by checkpatch.pl.

Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
---
 drivers/staging/rtl8192u/r819xU_phy.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
index 3155616..b2d81e9 100644
--- a/drivers/staging/rtl8192u/r819xU_phy.c
+++ b/drivers/staging/rtl8192u/r819xU_phy.c
@@ -1236,7 +1236,8 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
 		return false;
 	}
 	if (CmdTableIdx >= CmdTableSz) {
-		RT_TRACE(COMP_ERR, "%s(): Access invalid index, please check size of the table, CmdTableIdx:%d, CmdTableSz:%d\n",
+		RT_TRACE(COMP_ERR,
+			 "%s():invalid index,CmdTableIdx:%d, CmdTableSz:%d\n",
 			 __func__, CmdTableIdx, CmdTableSz);
 		return false;
 	}
@@ -1697,7 +1698,8 @@ void InitialGain819xUsb(struct net_device *dev,	u8 Operation)
 	priv->InitialGainOperateType = Operation;
 
 	if (priv->up)
-		queue_delayed_work(priv->priv_wq, &priv->initialgain_operate_wq, 0);
+		queue_delayed_work(priv->priv_wq,
+				   &priv->initialgain_operate_wq, 0);
 }
 
 void InitialGainOperateWorkItemCallBack(struct work_struct *work)
@@ -1786,7 +1788,8 @@ void InitialGainOperateWorkItemCallBack(struct work_struct *work)
 		RT_TRACE(COMP_SCAN, "Scan BBInitialGainRestore 0xa0a is %x\n",
 			 priv->initgain_backup.cca);
 
-		rtl8192_phy_setTxPower(dev, priv->ieee80211->current_network.channel);
+		rtl8192_phy_setTxPower(dev,
+					priv->ieee80211->current_network.channel);
 
 		if (dm_digtable.dig_algorithm == DIG_ALGO_BY_FALSE_ALARM)
 			/* FW DIG ON */
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning
  2014-07-10 12:24         ` [PATCH v4 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
@ 2014-07-10 22:15           ` Greg KH
  0 siblings, 0 replies; 27+ messages in thread
From: Greg KH @ 2014-07-10 22:15 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: devel, peter.senna, linux-kernel, rmfrfs, teobaluta, Sanjeev Sharma

On Thu, Jul 10, 2014 at 05:54:55PM +0530, sanjeev sharma wrote:
> From: sanjeev sharma <sanjeev_sharma@mentor.com>
> 
> This patch will remove whitespace and tabs reported by
> checkpatch.pl script.
> 
> Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
> ---
>  drivers/staging/rtl8192u/r819xU_phy.c | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
> index 0bcdd4e..0fcb673 100644
> --- a/drivers/staging/rtl8192u/r819xU_phy.c
> +++ b/drivers/staging/rtl8192u/r819xU_phy.c
> @@ -106,10 +106,10 @@ void rtl8192_setBBreg(struct net_device *dev, u32 reg_addr, u32 bitmask,
>  /******************************************************************************
>   * function:  This function reads specific bits from BB register
>   * input:     net_device	*dev
> - *            u32	 	reg_addr   //target addr to be readback
> - *            u32	 	bitmask    //taget bit pos to be readback
> - * output:    none
> - * return:    u32	 	data       //the readback register value
> + * u32		reg_addr   //target addr to be readback
> + * u32		bitmask    //taget bit pos to be readback
> + * output:	none
> + * return:	u32		data       //the readback register value
>   * notice:
>   ******************************************************************************/
>  u32 rtl8192_QueryBBReg(struct net_device *dev, u32 reg_addr, u32 bitmask)

That doesn't look like you cleaned it up well, it now looks worse.
Please keep the proper indentation of the variables.  It's not the
"proper" kernel coding style, but don't make code worse, like you did
here :(

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH v4 4/4] staging: rtl8192u: Fixed too long line
  2014-07-10 12:24         ` [PATCH v4 4/4] staging: rtl8192u: Fixed too long line sanjeev sharma
@ 2014-07-10 22:16           ` Greg KH
  0 siblings, 0 replies; 27+ messages in thread
From: Greg KH @ 2014-07-10 22:16 UTC (permalink / raw)
  To: sanjeev sharma
  Cc: devel, peter.senna, linux-kernel, rmfrfs, teobaluta, Sanjeev Sharma

On Thu, Jul 10, 2014 at 05:54:57PM +0530, sanjeev sharma wrote:
> From: sanjeev sharma <sanjeev_sharma@mentor.com>
> 
> This patch will fix too long lines warning
> reported by checkpatch.pl.
> 
> Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com>
> ---
>  drivers/staging/rtl8192u/r819xU_phy.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c
> index 3155616..b2d81e9 100644
> --- a/drivers/staging/rtl8192u/r819xU_phy.c
> +++ b/drivers/staging/rtl8192u/r819xU_phy.c
> @@ -1236,7 +1236,8 @@ static u8 rtl8192_phy_SetSwChnlCmdArray(SwChnlCmd *CmdTable, u32 CmdTableIdx,
>  		return false;
>  	}
>  	if (CmdTableIdx >= CmdTableSz) {
> -		RT_TRACE(COMP_ERR, "%s(): Access invalid index, please check size of the table, CmdTableIdx:%d, CmdTableSz:%d\n",
> +		RT_TRACE(COMP_ERR,
> +			 "%s():invalid index,CmdTableIdx:%d, CmdTableSz:%d\n",

Why did you change the string?  That's not ok, you can ignore this
warning, it's a string that you can not break up, or change.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2014-07-10 22:11 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-08  6:04 [PATCH] staging: rtl8192u: fix checkpatch error/warning in r819xU_phy.c sanjeev sharma
2014-07-08  7:43 ` Dan Carpenter
     [not found]   ` <CAGUYZuQgpNQRRg5X_AYv_iW5W60EdEwo0VOe3EJAPJocKrTf3g@mail.gmail.com>
2014-07-08 10:01     ` Dan Carpenter
2014-07-09  6:04       ` [PATCH v2 0/4] Fix checkpatch reported problem " sanjeev sharma
2014-07-09  6:04         ` [PATCH v2 1/4] staging: rtl8192u: Remove useless return statement " sanjeev sharma
2014-07-09  8:09           ` Dan Carpenter
2014-07-09 10:14             ` Sharma, Sanjeev
2014-07-09  6:04         ` [PATCH v2 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning " sanjeev sharma
2014-07-09  6:04         ` [PATCH v2 3/4] staging: rtl8192u: Fixed switch and case indentation error " sanjeev sharma
2014-07-09  6:04         ` [PATCH v2 4/4] staging: rtl8192u: Fixed too long lines " sanjeev sharma
2014-07-09 12:19       ` [PATCH v3 0/4] line wrapping of changelog sanjeev sharma
2014-07-09 12:15         ` Dan Carpenter
2014-07-09 12:19         ` [PATCH v3 1/4] staging: rtl8192u: Remove useless return statements sanjeev sharma
2014-07-09 19:24           ` Greg KH
2014-07-10 12:19             ` Sharma, Sanjeev
2014-07-09 12:19         ` [PATCH v3 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
2014-07-09 12:19         ` [PATCH v3 3/4] staging: rtl8192u: Fixed switch and case indentation error sanjeev sharma
2014-07-09 12:19         ` [PATCH v3 4/4] staging: rtl8192u: Fixed too long lines sanjeev sharma
2014-07-09 12:56           ` Joe Perches
2014-07-10 12:18             ` Sharma, Sanjeev
2014-07-10 12:24       ` [PATCH v4 0/4] staging: rtl8192u: checkpatch fixes sanjeev sharma
2014-07-10 12:24         ` [PATCH v4 1/4] staging: rtl8192u: Remove useless return statement sanjeev sharma
2014-07-10 12:24         ` [PATCH v4 2/4] staging: rtl8192u: Removed unnecessary whitespace & tab warning sanjeev sharma
2014-07-10 22:15           ` Greg KH
2014-07-10 12:24         ` [PATCH v4 3/4] staging: rtl8192u: Fixed switch and case indentation error sanjeev sharma
2014-07-10 12:24         ` [PATCH v4 4/4] staging: rtl8192u: Fixed too long line sanjeev sharma
2014-07-10 22:16           ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.