linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/24] Staging: winbond: Fixed some coding style issues
@ 2013-08-26 15:09 Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
                   ` (25 more replies)
  0 siblings, 26 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:09 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Fixes some coding style issues from drivers/staging/winbond

Iker Pedrosa (24):
  Staging: winbond: mto: removed function declaration
  Staging: winbond: mto: avoided use of extern functions
  Staging: winbond: mto: deleted extern functions
  Staging: winbond: phy_calibration: fixed some lines over 80 characters
  Staging: winbond: phy_calibration: fixed some lines over 80 characters
  Staging: winbond: reg: erased trailing whitespace
  Staging: winbond: reg: white space deleted
  Staging: winbond: reg: changed sleep function from msleep to usleep
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: reg: fixed some lines over 80 characters
  Staging: winbond: wb35reg_f: fixed lines over 80 characters
  Staging: winbond: wb35reg_s: deleted space before tabulation
  Staging: winbond: wb35rx: changed sleep function from msleep to usleep
  Staging: winbond: wb35rx: fixed some lines over 80 characters
  Staging: winbond: wb35tx: changed sleep function from msleep to usleep
  Staging: winbond: wb35tx: Replace printk with netdev_err
  Staging: winbond: wb35tx_s: erased the spaces after opening a '['
  Staging: winbond: wbusb: fixed some lines over 80 characters
  Staging: winbond: wbusb: changed sleep function from msleep to usleep

 drivers/staging/winbond/mto.c             |   7 +-
 drivers/staging/winbond/mto.h             |   8 +-
 drivers/staging/winbond/phy_calibration.c |  58 ++++---
 drivers/staging/winbond/reg.c             | 274 ++++++++++++++++++------------
 drivers/staging/winbond/wb35reg_f.h       |  18 +-
 drivers/staging/winbond/wb35reg_s.h       |   2 +-
 drivers/staging/winbond/wb35rx.c          |  11 +-
 drivers/staging/winbond/wb35tx.c          |  12 +-
 drivers/staging/winbond/wb35tx_s.h        |   2 +-
 drivers/staging/winbond/wbusb.c           |  18 +-
 10 files changed, 245 insertions(+), 165 deletions(-)

-- 
1.8.1.2


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

* [PATCH 01/24] Staging: winbond: mto: removed function declaration
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 02/24] Staging: winbond: mto: avoided use of extern functions Iker Pedrosa
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

The following function declarations have been removed because they aren't implemented.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/mto.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/winbond/mto.c b/drivers/staging/winbond/mto.c
index 560c0ab..0d0f9fb 100644
--- a/drivers/staging/winbond/mto.c
+++ b/drivers/staging/winbond/mto.c
@@ -46,10 +46,7 @@ static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];
 static u8 boSparseTxTraffic;
 
 void MTO_Init(struct wbsoft_priv *adapter);
-void TxRateReductionCtrl(struct wbsoft_priv *adapter);
 void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
-void MTO_TxFailed(struct wbsoft_priv *adapter);
-void hal_get_dto_para(struct wbsoft_priv *adapter, char *buffer);
 
 /*
  * ===========================================================================
-- 
1.8.1.2


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

* [PATCH 02/24] Staging: winbond: mto: avoided use of extern functions
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 03/24] Staging: winbond: mto: deleted " Iker Pedrosa
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Prototype of two functions added to the header to avoid the use of extern.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/mto.c | 4 +---
 drivers/staging/winbond/mto.h | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/winbond/mto.c b/drivers/staging/winbond/mto.c
index 0d0f9fb..b031ecd 100644
--- a/drivers/staging/winbond/mto.c
+++ b/drivers/staging/winbond/mto.c
@@ -21,6 +21,7 @@
 #include "wbhal.h"
 #include "wb35reg_f.h"
 #include "core.h"
+#include "mto.h"
 
 /* Declare SQ3 to rate and fragmentation threshold table */
 /* Declare fragmentation threshold table */
@@ -45,9 +46,6 @@ static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];
 
 static u8 boSparseTxTraffic;
 
-void MTO_Init(struct wbsoft_priv *adapter);
-void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
-
 /*
  * ===========================================================================
  * MTO_Init --
diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
index a0f659c..22bb264 100644
--- a/drivers/staging/winbond/mto.h
+++ b/drivers/staging/winbond/mto.h
@@ -127,12 +127,12 @@ extern u16 MTO_Frag_Th_Tbl[];
 #define MTO_DATA_RATE()			MTO_Data_Rate_Tbl[MTO_RATE_LEVEL()]
 #define MTO_FRAG_TH()			MTO_Frag_Th_Tbl[MTO_FRAG_TH_LEVEL()]
 
-extern void MTO_Init(struct wbsoft_priv *);
+void MTO_Init(struct wbsoft_priv *);
+void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
 extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *);
 extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8);
 extern u8 MTO_GetTxRate(struct wbsoft_priv *adapter, u32 fpdu_len);
 extern u8 MTO_GetTxFallbackRate(struct wbsoft_priv *adapter);
-extern void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
 
 #endif /* __MTO_H__ */
 
-- 
1.8.1.2


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

* [PATCH 03/24] Staging: winbond: mto: deleted extern functions
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 02/24] Staging: winbond: mto: avoided use of extern functions Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 04/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters Iker Pedrosa
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Deleted declaration of external functions that weren't used on this driver.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/mto.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
index 22bb264..8d41eed 100644
--- a/drivers/staging/winbond/mto.h
+++ b/drivers/staging/winbond/mto.h
@@ -129,10 +129,6 @@ extern u16 MTO_Frag_Th_Tbl[];
 
 void MTO_Init(struct wbsoft_priv *);
 void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
-extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *);
-extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8);
-extern u8 MTO_GetTxRate(struct wbsoft_priv *adapter, u32 fpdu_len);
-extern u8 MTO_GetTxFallbackRate(struct wbsoft_priv *adapter);
 
 #endif /* __MTO_H__ */
 
-- 
1.8.1.2


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

* [PATCH 04/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (2 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 03/24] Staging: winbond: mto: deleted " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 05/24] " Iker Pedrosa
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

First of the patches that fixes the lines over 80 characters in phy_calibration.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/phy_calibration.c | 46 ++++++++++++++++++-------------
 1 file changed, 27 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
index cfbfbbb..6635c85 100644
--- a/drivers/staging/winbond/phy_calibration.c
+++ b/drivers/staging/winbond/phy_calibration.c
@@ -27,10 +27,12 @@
 #define DEG2RAD(X)      (0.017453 * (X))
 
 static const s32 Angles[] = {
-	FIXED(DEG2RAD(45.0)),     FIXED(DEG2RAD(26.565)),   FIXED(DEG2RAD(14.0362)),
-	FIXED(DEG2RAD(7.12502)),  FIXED(DEG2RAD(3.57633)),  FIXED(DEG2RAD(1.78991)),
-	FIXED(DEG2RAD(0.895174)), FIXED(DEG2RAD(0.447614)), FIXED(DEG2RAD(0.223811)),
-	FIXED(DEG2RAD(0.111906)), FIXED(DEG2RAD(0.055953)), FIXED(DEG2RAD(0.027977))
+	FIXED(DEG2RAD(45.0)),     FIXED(DEG2RAD(26.565)),
+	FIXED(DEG2RAD(14.0362)),  FIXED(DEG2RAD(7.12502)),
+	FIXED(DEG2RAD(3.57633)),  FIXED(DEG2RAD(1.78991)),
+	FIXED(DEG2RAD(0.895174)), FIXED(DEG2RAD(0.447614)),
+	FIXED(DEG2RAD(0.223811)), FIXED(DEG2RAD(0.111906)),
+	FIXED(DEG2RAD(0.055953)), FIXED(DEG2RAD(0.027977))
 };
 
 /****************** LOCAL FUNCTION DECLARATION SECTION **********************/
@@ -296,7 +298,8 @@ void _sin_cos(s32 angle, s32 *sin, s32 *cos)
 	}
 }
 
-static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 *pValue)
+static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number,
+				     u32 *pValue)
 {
 	if (number < 0x1000)
 		number += 0x1000;
@@ -304,7 +307,8 @@ static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number, u32 *p
 }
 #define hw_get_dxx_reg(_A, _B, _C) hal_get_dxx_reg(_A, _B, (u32 *)_C)
 
-static unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number, u32 value)
+static unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number,
+				     u32 value)
 {
 	unsigned char ret;
 
@@ -407,7 +411,8 @@ void _rxadc_dc_offset_cancellation_winbond(struct hw_data *phw_data, u32 frequen
 	PHY_DEBUG(("[CAL]    ** adc_dc_cal_i = %d (0x%04X)\n",
 			   _s9_to_s32(val&0x000001FF), val&0x000001FF));
 	PHY_DEBUG(("[CAL]    ** adc_dc_cal_q = %d (0x%04X)\n",
-			   _s9_to_s32((val&0x0003FE00)>>9), (val&0x0003FE00)>>9));
+			   _s9_to_s32((val&0x0003FE00)>>9),
+			   (val&0x0003FE00)>>9));
 #endif
 
 	hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &val);
@@ -535,7 +540,8 @@ void _txidac_dc_offset_cancellation_winbond(struct hw_data *phw_data)
 		}
 
 		PHY_DEBUG(("[CAL]    ** fix_cancel_dc_i = %d (0x%04X)\n",
-				   fix_cancel_dc_i, _s32_to_s5(fix_cancel_dc_i)));
+				   fix_cancel_dc_i,
+				   _s32_to_s5(fix_cancel_dc_i)));
 
 		if ((abs(mag_1-mag_0)*6) > mag_0)
 			break;
@@ -711,7 +717,8 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,
 	loop = LOOP_TIMES;
 
 	while (loop > 0) {
-		PHY_DEBUG(("[CAL] [%d.] <_tx_iq_calibration_loop>\n", (LOOP_TIMES-loop+1)));
+		PHY_DEBUG(("[CAL] [%d.] <_tx_iq_calibration_loop>\n",
+				   (LOOP_TIMES-loop+1)));
 
 		iqcal_tone_i_avg = 0;
 		iqcal_tone_q_avg = 0;
@@ -719,8 +726,8 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,
 			return 0;
 		for (capture_time = 0; capture_time < 10; capture_time++) {
 			/*
-			 * a. Set iqcal_mode[1:0] to 0x2 and set "calib_start" to 0x1 to
-			 *    enable "IQ calibration Mode II"
+			 * a. Set iqcal_mode[1:0] to 0x2 and set "calib_start"
+			 *    to 0x1 to enable "IQ calibration Mode II"
 			 */
 			reg_mode_ctrl &= ~(MASK_IQCAL_TONE_SEL|MASK_IQCAL_MODE);
 			reg_mode_ctrl &= ~MASK_IQCAL_MODE;
@@ -749,8 +756,8 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,
 			PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
 
 			/*
-			 * d. Set iqcal_mode[1:0] to 0x3 and set "calib_start" to 0x1 to
-			 *    enable "IQ calibration Mode II"
+			 * d. Set iqcal_mode[1:0] to 0x3 and set "calib_start"
+			 *    to 0x1 to enable "IQ calibration Mode II"
 			 */
 			/* hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &val); */
 			hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl);
@@ -766,7 +773,7 @@ u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,
 			iqcal_tone_i = _s13_to_s32(val & 0x00001FFF);
 			iqcal_tone_q = _s13_to_s32((val & 0x03FFE000) >> 13);
 			PHY_DEBUG(("[CAL]    ** iqcal_tone_i = %d, iqcal_tone_q = %d\n",
-			iqcal_tone_i, iqcal_tone_q));
+					   iqcal_tone_i, iqcal_tone_q));
 			if (capture_time == 0)
 				continue;
 			else {
@@ -1146,7 +1153,8 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
 	/* for (loop = 0; loop < LOOP_TIMES; loop++) */
 	loop = LOOP_TIMES;
 	while (loop > 0) {
-		PHY_DEBUG(("[CAL] [%d.] <_rx_iq_calibration_loop>\n", (LOOP_TIMES-loop+1)));
+		PHY_DEBUG(("[CAL] [%d.] <_rx_iq_calibration_loop>\n",
+				   (LOOP_TIMES-loop+1)));
 		iqcal_tone_i_avg = 0;
 		iqcal_tone_q_avg = 0;
 		iqcal_image_i_avg = 0;
@@ -1199,13 +1207,13 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
 
 		/* d. */
 		rot_tone_i_b = (iqcal_tone_i * iqcal_tone_i +
-						iqcal_tone_q * iqcal_tone_q) / 1024;
+					iqcal_tone_q * iqcal_tone_q) / 1024;
 		rot_tone_q_b = (iqcal_tone_i * iqcal_tone_q * (-1) +
-						iqcal_tone_q * iqcal_tone_i) / 1024;
+					iqcal_tone_q * iqcal_tone_i) / 1024;
 		rot_image_i_b = (iqcal_image_i * iqcal_tone_i -
-						 iqcal_image_q * iqcal_tone_q) / 1024;
+					iqcal_image_q * iqcal_tone_q) / 1024;
 		rot_image_q_b = (iqcal_image_i * iqcal_tone_q +
-						 iqcal_image_q * iqcal_tone_i) / 1024;
+					iqcal_image_q * iqcal_tone_i) / 1024;
 
 		PHY_DEBUG(("[CAL]    ** rot_tone_i_b  = %d\n", rot_tone_i_b));
 		PHY_DEBUG(("[CAL]    ** rot_tone_q_b  = %d\n", rot_tone_q_b));
-- 
1.8.1.2


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

* [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (3 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 04/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 16:02   ` Dan Carpenter
  2013-08-27 23:46   ` Greg KH
  2013-08-26 15:10 ` [PATCH 06/24] Staging: winbond: reg: erased trailing whitespace Iker Pedrosa
                   ` (20 subsequent siblings)
  25 siblings, 2 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Second of the patches that fixes the lines over 80 characters in phy_calibration.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/phy_calibration.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
index 6635c85..a4f3773 100644
--- a/drivers/staging/winbond/phy_calibration.c
+++ b/drivers/staging/winbond/phy_calibration.c
@@ -1233,8 +1233,10 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
 		b_2 = (rot_image_q_b * 32768) / rot_tone_i_b -
 			phw_data->iq_rsdl_phase_tx_d2;
 
-		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n", phw_data->iq_rsdl_gain_tx_d2));
-		PHY_DEBUG(("[CAL]    ** iq_rsdl_phase_tx_d2= %d\n", phw_data->iq_rsdl_phase_tx_d2));
+		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n",
+				   phw_data->iq_rsdl_gain_tx_d2));
+		PHY_DEBUG(("[CAL]    ** iq_rsdl_phase_tx_d2= %d\n",
+				   phw_data->iq_rsdl_phase_tx_d2));
 		PHY_DEBUG(("[CAL]    ***** EPSILON/2 = %d\n", a_2));
 		PHY_DEBUG(("[CAL]    ***** THETA/2   = %d\n", b_2));
 
@@ -1280,7 +1282,8 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
 
 		/* e. */
 		pwr_tone = (iqcal_tone_i*iqcal_tone_i + iqcal_tone_q*iqcal_tone_q);
-		pwr_image = (iqcal_image_i*iqcal_image_i + iqcal_image_q*iqcal_image_q)*factor;
+		pwr_image = (iqcal_image_i*iqcal_image_i +
+				   iqcal_image_q*iqcal_image_q)*factor;
 
 		PHY_DEBUG(("[CAL]    ** pwr_tone  = %d\n", pwr_tone));
 		PHY_DEBUG(("[CAL]    ** pwr_image  = %d\n", pwr_image));
@@ -1577,7 +1580,8 @@ unsigned char adjust_TXVGA_for_iq_mag(struct hw_data *phw_data)
 
 		sqsum = iqcal_tone_i0*iqcal_tone_i0 + iqcal_tone_q0*iqcal_tone_q0;
 		iq_mag_0_tx = (s32) _sqrt(sqsum);
-		PHY_DEBUG(("[CAL]    ** auto_adjust_txvga_for_iq_mag_0_tx=%d\n", iq_mag_0_tx));
+		PHY_DEBUG(("[CAL]    ** auto_adjust_txvga_for_iq_mag_0_tx=%d\n",
+				   iq_mag_0_tx));
 
 		if (iq_mag_0_tx >= 700 && iq_mag_0_tx <= 1750)
 			break;
-- 
1.8.1.2


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

* [PATCH 06/24] Staging: winbond: reg: erased trailing whitespace
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (4 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 05/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 07/24] Staging: winbond: reg: white space deleted Iker Pedrosa
                   ` (19 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Erased all the errors given by checkpatch stating trailing whitespace.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 75b7752..5883d23 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -920,7 +920,7 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)
 	Wb35Reg_WriteSync(pHwData, 0x03f8, 0x7ff);
 }
 
-static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp, 
+static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,
 					char number)
 {
 	u8	i;
@@ -930,7 +930,7 @@ static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,
 	}
 }
 
-static void Set_ChanIndep_RfData_al7230_50(struct hw_data *pHwData, u32 *pltmp, 
+static void Set_ChanIndep_RfData_al7230_50(struct hw_data *pHwData, u32 *pltmp,
 					char number)
 {
 	u8	i;
@@ -1620,13 +1620,13 @@ void BBProcessor_initial(struct hw_data *pHwData)
 		reg->SQ3_filter[i] = 0x2f; /* half of Bit 0 ~ 6 */
 }
 
-static inline void set_tx_power_per_channel_max2829(struct hw_data *pHwData,  
+static inline void set_tx_power_per_channel_max2829(struct hw_data *pHwData,
 						struct chan_info Channel)
 {
 	RFSynthesizer_SetPowerIndex(pHwData, 100);
 }
 
-static void set_tx_power_per_channel_al2230(struct hw_data *pHwData,  
+static void set_tx_power_per_channel_al2230(struct hw_data *pHwData,
 					struct chan_info Channel)
 {
 	u8	index = 100;
@@ -1636,7 +1636,7 @@ static void set_tx_power_per_channel_al2230(struct hw_data *pHwData,
 	RFSynthesizer_SetPowerIndex(pHwData, index);
 }
 
-static void set_tx_power_per_channel_al7230(struct hw_data *pHwData,  
+static void set_tx_power_per_channel_al7230(struct hw_data *pHwData,
 					struct chan_info Channel)
 {
 	u8	i, index = 100;
@@ -1660,7 +1660,7 @@ static void set_tx_power_per_channel_al7230(struct hw_data *pHwData,
 	RFSynthesizer_SetPowerIndex(pHwData, index);
 }
 
-static void set_tx_power_per_channel_wb242(struct hw_data *pHwData,  
+static void set_tx_power_per_channel_wb242(struct hw_data *pHwData,
 					struct chan_info Channel)
 {
 	u8	index = 100;
-- 
1.8.1.2


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

* [PATCH 07/24] Staging: winbond: reg: white space deleted
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (5 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 06/24] Staging: winbond: reg: erased trailing whitespace Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

White space deleted before semicolons.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 5883d23..80b4b34 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1088,7 +1088,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		msleep(5);
 
 		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01A0, 20);
-		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp) ;
+		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		Wb35Reg_WriteSync(pHwData, 0x105c, pHwData->reg.BB5C);
 		pHwData->reg.BB50 &= ~0x13; /* (MASK_IQCAL_MODE|MASK_CALIB_START); */
@@ -2096,7 +2096,7 @@ void Mxx_initial(struct hw_data *pHwData)
 	pltmp[5] = reg->M38_MacControl;
 
 	/* M3C */
-	tmp = (DEFAULT_PIFST << 26) | (DEFAULT_EIFST << 16) | (DEFAULT_DIFST << 8) | (DEFAULT_SIFST << 4) | DEFAULT_OSIFST ;
+	tmp = (DEFAULT_PIFST << 26) | (DEFAULT_EIFST << 16) | (DEFAULT_DIFST << 8) | (DEFAULT_SIFST << 4) | DEFAULT_OSIFST;
 	reg->M3C_MacControl = tmp;
 	pltmp[6] = tmp;
 
-- 
1.8.1.2


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

* [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (6 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 07/24] Staging: winbond: reg: white space deleted Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-27 23:38   ` Greg KH
  2013-08-26 15:10 ` [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters Iker Pedrosa
                   ` (17 subsequent siblings)
  25 siblings, 1 reply; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 52 +++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 80b4b34..61916f5 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -890,9 +890,9 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)
 	else {
 		Wb35Reg_WriteSync(pHwData, 0x03f4, 0xFF5807FF);
 		Wb35Reg_WriteSync(pHwData, 0x03d4, 0x80); /* regulator on only */
-		msleep(10);
+		usleep(10000);
 		Wb35Reg_WriteSync(pHwData, 0x03d4, 0xb8); /* REG_ON RF_RSTN on, and */
-		msleep(10);
+		usleep(10000);
 		ltmp = 0x4968;
 		if ((pHwData->phy_type == RF_WB_242) ||
 			(RF_WB_242_1 == pHwData->phy_type))
@@ -905,7 +905,7 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)
 		Wb35Reg_ReadSync(pHwData, 0x03d0, &ltmp);
 		loop = 500; /* Wait for 5 second */
 		while (!(ltmp & 0x20) && loop--) {
-			msleep(10);
+			usleep(10000);
 			if (!Wb35Reg_ReadSync(pHwData, 0x03d0, &ltmp))
 				break;
 		}
@@ -914,7 +914,7 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)
 	}
 
 	Wb35Reg_WriteSync(pHwData, 0x03b0, 1); /* Reset hardware first */
-	msleep(10);
+	usleep(10000);
 
 	/* Set burst write delay */
 	Wb35Reg_WriteSync(pHwData, 0x03f8, 0x7ff);
@@ -1055,18 +1055,18 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 	case RF_AIROHA_2230:
 		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x07 << 20) | 0xE168E, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(10);
+		usleep(10000);
 		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_rf_data[7], 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(10);
+		usleep(10000);
 	case RF_AIROHA_2230S:
 		Wb35Reg_WriteSync(pHwData, 0x03d4, 0x80); /* regulator on only */
-		msleep(10);
+		usleep(10000);
 		Wb35Reg_WriteSync(pHwData, 0x03d4, 0xa0); /* PLL_PD REF_PD set to 0 */
-		msleep(10);
+		usleep(10000);
 		Wb35Reg_WriteSync(pHwData, 0x03d4, 0xe0); /* MLK_EN */
 		Wb35Reg_WriteSync(pHwData, 0x03b0, 1); /* Reset hardware first */
-		msleep(10);
+		usleep(10000);
 		/* ========================================================= */
 
 		/* The follow code doesn't use the burst-write mode */
@@ -1077,15 +1077,15 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		Wb35Reg_WriteSync(pHwData, 0x105c, ltmp);
 		pHwData->reg.BB50 |= 0x13; /* (MASK_IQCAL_MODE|MASK_CALIB_START) */
 		Wb35Reg_WriteSync(pHwData, 0x1050, pHwData->reg.BB50);
-		msleep(5);
+		usleep(5000);
 
 		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01B0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 
 		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01E0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 
 		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01A0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
@@ -1102,13 +1102,13 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* 2.4GHz */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x9ABA8F;
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x3ABA8F;
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x1ABA8F;
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 
 		/* 5GHz */
 		Wb35Reg_WriteSync(pHwData, 0x03dc, 0x00000000);
@@ -1119,20 +1119,20 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* Write to register. number must less and equal than 16 */
 		for (i = 0; i < number; i++)
 			Wb35Reg_WriteSync(pHwData, 0x0864, pltmp[i]);
-		msleep(5);
+		usleep(5000);
 
 		Wb35Reg_WriteSync(pHwData, 0x03dc, 0x00000080);
 		pr_debug("* PLL_ON    high\n");
 
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x9ABA8F;
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x3ABA8F;
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x12BACF;
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		break;
 	case RF_WB_242:
 	case RF_WB_242_1:
@@ -1147,11 +1147,11 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* Calibration (1a.0). Synthesizer reset */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00101E, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		/* Calibration (1a). VCO frequency calibration mode ; waiting 2msec VCO calibration time */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFE69c0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(2);
+		usleep(2000);
 
 		/* ----- Calibration (2). TX baseband Gm-C filter auto-tuning */
 		/* Calibration (2a). turn off ENCAL signal */
@@ -1210,7 +1210,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(2);
+		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
@@ -1222,7 +1222,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(2);
+		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
@@ -1234,7 +1234,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(2);
+		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
@@ -1246,7 +1246,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(2);
+		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
@@ -1258,7 +1258,7 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* 0x00 0xF86100 ; 3E184   ; Switch RF chip to normal mode */
 		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF86100, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-		msleep(5);
+		usleep(5000);
 		break;
 	}
 }
-- 
1.8.1.2


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

* [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (7 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 16:12   ` Dan Carpenter
  2013-08-26 16:20   ` Dan Carpenter
  2013-08-26 15:10 ` [PATCH 10/24] " Iker Pedrosa
                   ` (16 subsequent siblings)
  25 siblings, 2 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

First of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 30 +++++++++++++++++-------------
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 61916f5..b1d977a 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -809,12 +809,12 @@ u32 w89rf242_txvga_data[][5] = {
 	{(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242}
 };
 
-/* ================================================================================================== */
+/* ========================================================================= */
 
 
 
 /*
- * =============================================================================================================
+ * ============================================================================
  *  Uxx_ReadEthernetAddress --
  *
  *  Routine Description:
@@ -826,15 +826,16 @@ u32 w89rf242_txvga_data[][5] = {
  *  Return Value:
  *
  *    The address is stored in EthernetIDAddr.
- * =============================================================================================================
+ * ============================================================================
  */
 void Uxx_ReadEthernetAddress(struct hw_data *pHwData)
 {
 	u32	ltmp;
 
 	/*
-	 * Reading Ethernet address from EEPROM and set into hardware due to MAC address maybe change.
-	 * Only unplug and plug again can make hardware read EEPROM again.
+	 * Reading Ethernet address from EEPROM and set into hardware due to
+	 * MAC address maybe change. Only unplug and plug again can make
+	 * hardware read EEPROM again.
 	 */
 	Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08000000); /* Start EEPROM access + Read + address(0x0d) */
 	Wb35Reg_ReadSync(pHwData, 0x03b4, &ltmp);
@@ -852,18 +853,19 @@ void Uxx_ReadEthernetAddress(struct hw_data *pHwData)
 
 
 /*
- * ===============================================================================================================
+ * ============================================================================
  *  CardGetMulticastBit --
  *  Description:
- *    For a given multicast address, returns the byte and bit in the card multicast registers that it hashes to.
- *    Calls CardComputeCrc() to determine the CRC value.
+ *    For a given multicast address, returns the byte and bit in the card
+ *    multicast registers that it hashes to. Calls CardComputeCrc() to
+ *    determine the CRC value.
  *  Arguments:
  *    Address - the address
  *    Byte - the byte that it hashes to
  *    Value - will have a 1 in the relevant bit
  *  Return Value:
  *    None.
- * ==============================================================================================================
+ * ============================================================================
  */
 void CardGetMulticastBit(u8 Address[ETH_ALEN], u8 *Byte, u8 *Value)
 {
@@ -926,7 +928,8 @@ static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,
 	u8	i;
 	for (i = 0; i < number; i++) {
 		pHwData->phy_para[i] = al7230_rf_data_24[i];
-		pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_rf_data_24[i] & 0xffffff);
+		pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24)
+				   | (al7230_rf_data_24[i] & 0xffffff);
 	}
 }
 
@@ -936,15 +939,16 @@ static void Set_ChanIndep_RfData_al7230_50(struct hw_data *pHwData, u32 *pltmp,
 	u8	i;
 	for (i = 0; i < number; i++) {
 		pHwData->phy_para[i] = al7230_rf_data_50[i];
-		pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_rf_data_50[i] & 0xffffff);
+		pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24)
+				   | (al7230_rf_data_50[i] & 0xffffff);
 	}
 }
 
 
 /*
- * =============================================================================================================
+ * ============================================================================
  * RFSynthesizer_initial --
- * =============================================================================================================
+ * ============================================================================
  */
 void RFSynthesizer_initial(struct hw_data *pHwData)
 {
-- 
1.8.1.2


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

* [PATCH 10/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (8 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 11/24] " Iker Pedrosa
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Second of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index b1d977a..300038a 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -974,42 +974,48 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		number = ARRAY_SIZE(max2825_rf_data);
 		for (i = 0; i < number; i++) {
 			pHwData->phy_para[i] = max2825_rf_data[i]; /* Backup Rf parameter */
-			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2825_rf_data[i], 18);
+			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24)
+					   | BitReverse(max2825_rf_data[i], 18);
 		}
 		break;
 	case RF_MAXIM_2827:
 		number = ARRAY_SIZE(max2827_rf_data);
 		for (i = 0; i < number; i++) {
 			pHwData->phy_para[i] = max2827_rf_data[i];
-			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_rf_data[i], 18);
+			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24)
+					   | BitReverse(max2827_rf_data[i], 18);
 		}
 		break;
 	case RF_MAXIM_2828:
 		number = ARRAY_SIZE(max2828_rf_data);
 		for (i = 0; i < number; i++) {
 			pHwData->phy_para[i] = max2828_rf_data[i];
-			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_rf_data[i], 18);
+			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24)
+					   | BitReverse(max2828_rf_data[i], 18);
 		}
 		break;
 	case RF_MAXIM_2829:
 		number = ARRAY_SIZE(max2829_rf_data);
 		for (i = 0; i < number; i++) {
 			pHwData->phy_para[i] = max2829_rf_data[i];
-			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2829_rf_data[i], 18);
+			pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24)
+					   | BitReverse(max2829_rf_data[i], 18);
 		}
 		break;
 	case RF_AIROHA_2230:
 		number = ARRAY_SIZE(al2230_rf_data);
 		for (i = 0; i < number; i++) {
 			pHwData->phy_para[i] = al2230_rf_data[i];
-			pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_rf_data[i], 20);
+			pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24)
+					   | BitReverse(al2230_rf_data[i], 20);
 		}
 		break;
 	case RF_AIROHA_2230S:
 		number = ARRAY_SIZE(al2230s_rf_data);
 		for (i = 0; i < number; i++) {
 			pHwData->phy_para[i] = al2230s_rf_data[i];
-			pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230s_rf_data[i], 20);
+			pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24)
+					   | BitReverse(al2230s_rf_data[i], 20);
 		}
 		break;
 	case RF_AIROHA_7230:
@@ -1030,7 +1036,8 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 			}
 
 			pHwData->phy_para[i] = ltmp;
-			pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse(ltmp, 24);
+			pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24)
+					   | BitReverse(ltmp, 24);
 		}
 		break;
 	}
@@ -1057,10 +1064,12 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 
 	switch (pHwData->phy_type) {
 	case RF_AIROHA_2230:
-		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x07 << 20) | 0xE168E, 20);
+		ltmp = (1 << 31) | (0 << 30) | (20 << 24)
+			       | BitReverse((0x07 << 20) | 0xE168E, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(10000);
-		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_rf_data[7], 20);
+		ltmp = (1 << 31) | (0 << 30) | (20 << 24)
+			       | BitReverse(al2230_rf_data[7], 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(10000);
 	case RF_AIROHA_2230S:
@@ -1074,7 +1083,8 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		/* ========================================================= */
 
 		/* The follow code doesn't use the burst-write mode */
-		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F<<20) | 0xF01A0, 20);
+		ltmp = (1 << 31) | (0 << 30) | (20 << 24)
+			       | BitReverse((0x0F<<20) | 0xF01A0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		ltmp = pHwData->reg.BB5C & 0xfffff000;
-- 
1.8.1.2


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

* [PATCH 11/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (9 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 10/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 12/24] " Iker Pedrosa
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Third of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 300038a..0cb0798 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1093,15 +1093,18 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 		Wb35Reg_WriteSync(pHwData, 0x1050, pHwData->reg.BB50);
 		usleep(5000);
 
-		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01B0, 20);
+		ltmp = (1 << 31) | (0 << 30) | (20 << 24)
+			       | BitReverse((0x0F << 20) | 0xF01B0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(5000);
 
-		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01E0, 20);
+		ltmp = (1 << 31) | (0 << 30) | (20 << 24)
+			       | BitReverse((0x0F << 20) | 0xF01E0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(5000);
 
-		ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01A0, 20);
+		ltmp = (1 << 31) | (0 << 30) | (20 << 24)
+			       | BitReverse((0x0F << 20) | 0xF01A0, 20);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		Wb35Reg_WriteSync(pHwData, 0x105c, pHwData->reg.BB5C);
@@ -1159,30 +1162,37 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 
 		/* ----- Calibration (1). VCO frequency calibration */
 		/* Calibration (1a.0). Synthesizer reset */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00101E, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x0F<<24) | 0x00101E, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(5000);
 		/* Calibration (1a). VCO frequency calibration mode ; waiting 2msec VCO calibration time */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFE69c0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFE69c0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(2000);
 
 		/* ----- Calibration (2). TX baseband Gm-C filter auto-tuning */
 		/* Calibration (2a). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF8EBC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xF8EBC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (2b.0). TX filter auto-tuning BW: TFLBW=101 (TC5376A default) */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x07<<24) | 0x0C68CE, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x07<<24) | 0x0C68CE, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (2b). send TX reset signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00201E, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x0F<<24) | 0x00201E, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (2c). turn-on TX Gm-C filter auto-tuning */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFCEBC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFCEBC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		udelay(150); /* Sleep 150 us */
 		/* turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF8EBC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xF8EBC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* ----- Calibration (3). RX baseband Gm-C filter auto-tuning */
-- 
1.8.1.2


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

* [PATCH 12/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (10 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 11/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 13/24] " Iker Pedrosa
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Fourth of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 0cb0798..acdc003 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1197,46 +1197,57 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 
 		/* ----- Calibration (3). RX baseband Gm-C filter auto-tuning */
 		/* Calibration (3a). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (3b.0). RX filter auto-tuning BW: RFLBW=100 (TC5376A+corner default;) */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x07<<24) | 0x0C68CE, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x07<<24) | 0x0C68CE, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (3b). send RX reset signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00401E, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x0F<<24) | 0x00401E, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (3c). turn-on RX Gm-C filter auto-tuning */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFEEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFEEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		udelay(150); /* Sleep 150 us */
 		/* Calibration (3e). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* ----- Calibration (4). TX LO leakage calibration */
 		/* Calibration (4a). TX LO leakage calibration */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFD6BC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFD6BC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		udelay(150); /* Sleep 150 us */
 
 		/* ----- Calibration (5). RX DC offset calibration */
 		/* Calibration (5a). turn off ENCAL signal and set to RX SW DC calibration mode */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (5b). turn off AGC servo-loop & RSSI */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x01<<24) | 0xEBFFC2, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x01<<24) | 0xEBFFC2, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* for LNA=11 -------- */
 		/* Calibration (5c-h). RX DC offset current bias ON; & LNA=11; RXVGA=111111 */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x343FCC, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x06<<24) | 0x343FCC, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* for LNA=10 -------- */
-- 
1.8.1.2


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

* [PATCH 13/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (11 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 12/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 14/24] " Iker Pedrosa
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Fifth of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index acdc003..b05f9bd 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1252,46 +1252,57 @@ void RFSynthesizer_initial(struct hw_data *pHwData)
 
 		/* for LNA=10 -------- */
 		/* Calibration (5c-m). RX DC offset current bias ON; & LNA=10; RXVGA=111111 */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x342FCC, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x06<<24) | 0x342FCC, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* for LNA=01 -------- */
 		/* Calibration (5c-m). RX DC offset current bias ON; & LNA=01; RXVGA=111111 */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x341FCC, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x06<<24) | 0x341FCC, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* for LNA=00 -------- */
 		/* Calibration (5c-l). RX DC offset current bias ON; & LNA=00; RXVGA=111111 */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x340FCC, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x06<<24) | 0x340FCC, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFF6DC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(2000);
 		/* Calibration (5f). turn off ENCAL signal */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xFAEDC0, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		/* Calibration (5g). turn on AGC servo-loop */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x01<<24) | 0xEFFFC2, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x01<<24) | 0xEFFFC2, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 
 		/* ----- Calibration (7). Switch RF chip to normal mode */
 		/* 0x00 0xF86100 ; 3E184   ; Switch RF chip to normal mode */
-		ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF86100, 24);
+		ltmp = (1 << 31) | (0 << 30) | (24 << 24)
+			       | BitReverse((0x00<<24) | 0xF86100, 24);
 		Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
 		usleep(5000);
 		break;
-- 
1.8.1.2


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

* [PATCH 14/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (12 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 13/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 15/24] " Iker Pedrosa
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Sixth of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index b05f9bd..50ca7dd 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1738,7 +1738,8 @@ static void set_tx_power_per_channel_wb242(struct hw_data *pHwData,
  *   None.
  * ===========================================================================
  */
-void RFSynthesizer_SwitchingChannel(struct hw_data *pHwData,  struct chan_info Channel)
+void RFSynthesizer_SwitchingChannel(struct hw_data *pHwData,
+					   struct chan_info Channel)
 {
 	struct wb35_reg *reg = &pHwData->reg;
 	u32	pltmp[16]; /* The 16 is the maximum capability of hardware */
@@ -1891,9 +1892,9 @@ void RFSynthesizer_SwitchingChannel(struct hw_data *pHwData,  struct chan_info C
 		/* BB: select 5 GHz */
 		reg->BB50 &= ~(BIT(11) | BIT(12));
 		if (Channel.ChanNo <= 64)
-			reg->BB50 |= BIT(12);				/* 10-5.25GHz */
+			reg->BB50 |= BIT(12);			/* 10-5.25GHz */
 		else if ((Channel.ChanNo >= 100) && (Channel.ChanNo <= 124))
-			reg->BB50 |= BIT(11);				/* 01-5.48GHz */
+			reg->BB50 |= BIT(11);			/* 01-5.48GHz */
 		else if ((Channel.ChanNo >= 128) && (Channel.ChanNo <= 161))
 			reg->BB50 |= (BIT(12) | BIT(11));	/* 11-5.775GHz */
 		else	/* Chan 184 ~ 196 will use bit[12-11] = 10 in version sh-src-1.2.25 */
@@ -1968,7 +1969,8 @@ u8 RFSynthesizer_SetMaxim2828_24Power(struct hw_data *pHwData, u8 index)
 	u32	PowerData;
 	if (index > 1)
 		index = 1;
-	PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_power_data_24[index], 18);
+	PowerData = (1 << 31) | (0 << 30) | (18 << 24)
+			    | BitReverse(max2828_power_data_24[index], 18);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return index;
 }
@@ -1978,7 +1980,8 @@ u8 RFSynthesizer_SetMaxim2828_50Power(struct hw_data *pHwData, u8 index)
 	u32	PowerData;
 	if (index > 1)
 		index = 1;
-	PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_power_data_50[index], 18);
+	PowerData = (1 << 31) | (0 << 30) | (18 << 24)
+			    | BitReverse(max2828_power_data_50[index], 18);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return index;
 }
@@ -1988,7 +1991,8 @@ u8 RFSynthesizer_SetMaxim2827_24Power(struct hw_data *pHwData, u8 index)
 	u32	PowerData;
 	if (index > 1)
 		index = 1;
-	PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_power_data_24[index], 18);
+	PowerData = (1 << 31) | (0 << 30) | (18 << 24)
+			    | BitReverse(max2827_power_data_24[index], 18);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return index;
 }
@@ -1998,7 +2002,8 @@ u8 RFSynthesizer_SetMaxim2827_50Power(struct hw_data *pHwData, u8 index)
 	u32	PowerData;
 	if (index > 1)
 		index = 1;
-	PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_power_data_50[index], 18);
+	PowerData = (1 << 31) | (0 << 30) | (18 << 24)
+			    | BitReverse(max2827_power_data_50[index], 18);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return index;
 }
@@ -2008,7 +2013,8 @@ u8 RFSynthesizer_SetMaxim2825Power(struct hw_data *pHwData, u8 index)
 	u32	PowerData;
 	if (index > 1)
 		index = 1;
-	PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2825_power_data_24[index], 18);
+	PowerData = (1 << 31) | (0 << 30) | (18 << 24)
+			    | BitReverse(max2825_power_data_24[index], 18);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return index;
 }
@@ -2026,7 +2032,8 @@ u8 RFSynthesizer_SetAiroha2230Power(struct hw_data *pHwData, u8 index)
 	if (i == count)
 		i--;
 
-	PowerData = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_txvga_data[i][0], 20);
+	PowerData = (1 << 31) | (0 << 30) | (20 << 24)
+			    | BitReverse(al2230_txvga_data[i][0], 20);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return i;
 }
@@ -2043,7 +2050,8 @@ u8 RFSynthesizer_SetAiroha7230Power(struct hw_data *pHwData, u8 index)
 	}
 	if (i == count)
 		i--;
-	PowerData = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_txvga_data[i][0] & 0xffffff);
+	PowerData = (1 << 31) | (0 << 30) | (24 << 24)
+			    | (al7230_txvga_data[i][0] & 0xffffff);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 	return i;
 }
-- 
1.8.1.2


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

* [PATCH 15/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (13 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 14/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 16/24] Staging: winbond: wb35reg_f: fixed " Iker Pedrosa
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Seventh of the patches that fixes the lines over 80 characters in reg.c

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/reg.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 50ca7dd..6cafd69 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -2070,7 +2070,8 @@ u8 RFSynthesizer_SetWinbond242Power(struct hw_data *pHwData, u8 index)
 		i--;
 
 	/* Set TxVga into RF */
-	PowerData = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse(w89rf242_txvga_data[i][0], 24);
+	PowerData = (1 << 31) | (0 << 30) | (24 << 24)
+			    | BitReverse(w89rf242_txvga_data[i][0], 24);
 	Wb35Reg_Write(pHwData, 0x0864, PowerData);
 
 	/* Update BB48 BB4C BB58 for high precision txvga */
@@ -2146,11 +2147,15 @@ void Mxx_initial(struct hw_data *pHwData)
 	pltmp[4] = tmp;
 
 	/* M38 */
-	reg->M38_MacControl = (DEFAULT_RATE_RETRY_LIMIT << 8) | (DEFAULT_LONG_RETRY_LIMIT << 4) | DEFAULT_SHORT_RETRY_LIMIT;
+	reg->M38_MacControl = (DEFAULT_RATE_RETRY_LIMIT << 8) |
+				       (DEFAULT_LONG_RETRY_LIMIT << 4) |
+				       DEFAULT_SHORT_RETRY_LIMIT;
 	pltmp[5] = reg->M38_MacControl;
 
 	/* M3C */
-	tmp = (DEFAULT_PIFST << 26) | (DEFAULT_EIFST << 16) | (DEFAULT_DIFST << 8) | (DEFAULT_SIFST << 4) | DEFAULT_OSIFST;
+	tmp = (DEFAULT_PIFST << 26) | (DEFAULT_EIFST << 16) |
+		       (DEFAULT_DIFST << 8) | (DEFAULT_SIFST << 4) |
+		       DEFAULT_OSIFST;
 	reg->M3C_MacControl = tmp;
 	pltmp[6] = tmp;
 
@@ -2173,7 +2178,9 @@ void Mxx_initial(struct hw_data *pHwData)
 	pltmp[9] = tmp;
 
 	/* M4C */
-	reg->M4C_MacStatus = (DEFAULT_PROTOCOL_VERSION << 30) | (DEFAULT_MAC_POWER_STATE << 28) | (DEFAULT_DTIM_ALERT_TIME << 24);
+	reg->M4C_MacStatus = (DEFAULT_PROTOCOL_VERSION << 30) |
+				      (DEFAULT_MAC_POWER_STATE << 28) |
+				      (DEFAULT_DTIM_ALERT_TIME << 24);
 	pltmp[10] = reg->M4C_MacStatus;
 
 	for (i = 0; i < 11; i++)
@@ -2245,10 +2252,11 @@ void GetTxVgaFromEEPROM(struct hw_data *pHwData)
 }
 
 /*
- * This function will affect the TxVga parameter in HAL. If hal_set_current_channel
- * or RFSynthesizer_SetPowerIndex be called, new TxVga will take effect.
- * TxVgaSettingInEEPROM of sHwData is an u8 array point to EEPROM contain for IS89C35
- * This function will use default TxVgaSettingInEEPROM data to calculate new TxVga.
+ * This function will affect the TxVga parameter in HAL. If
+ * hal_set_current_channel or RFSynthesizer_SetPowerIndex be called, new TxVga
+ * will take effect. TxVgaSettingInEEPROM of sHwData is an u8 array point to
+ * EEPROM contain for IS89C35. This function will use default
+ * TxVgaSettingInEEPROM data to calculate new TxVga.
  */
 void EEPROMTxVgaAdjust(struct hw_data *pHwData)
 {
-- 
1.8.1.2


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

* [PATCH 16/24] Staging: winbond: wb35reg_f: fixed lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (14 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 15/24] " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation Iker Pedrosa
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Fixed lines over 80 characters.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35reg_f.h | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/winbond/wb35reg_f.h b/drivers/staging/winbond/wb35reg_f.h
index 95dc980..cd6710c 100644
--- a/drivers/staging/winbond/wb35reg_f.h
+++ b/drivers/staging/winbond/wb35reg_f.h
@@ -15,7 +15,8 @@ void Uxx_ReadEthernetAddress(struct hw_data *hw_data);
 void Dxx_initial(struct hw_data *hw_data);
 void Mxx_initial(struct hw_data *hw_data);
 void RFSynthesizer_initial(struct hw_data *hw_data);
-void RFSynthesizer_SwitchingChannel(struct hw_data *hw_data, struct chan_info channel);
+void RFSynthesizer_SwitchingChannel(struct hw_data *hw_data,
+					   struct chan_info channel);
 void BBProcessor_initial(struct hw_data *hw_data);
 void BBProcessor_RateChanging(struct hw_data *hw_data, u8 rate);
 u8 RFSynthesizer_SetPowerIndex(struct hw_data *hw_data, u8 power_index);
@@ -34,10 +35,14 @@ void EEPROMTxVgaAdjust(struct hw_data *hw_data);
 
 void Wb35Reg_destroy(struct hw_data *hw_data);
 
-unsigned char Wb35Reg_Read(struct hw_data *hw_data, u16 register_no, u32 *register_value);
-unsigned char Wb35Reg_ReadSync(struct hw_data *hw_data, u16 register_no, u32 *register_value);
-unsigned char Wb35Reg_Write(struct hw_data *hw_data, u16 register_no, u32 register_value);
-unsigned char Wb35Reg_WriteSync(struct hw_data *hw_data, u16 register_no, u32 register_value);
+unsigned char Wb35Reg_Read(struct hw_data *hw_data, u16 register_no,
+				   u32 *register_value);
+unsigned char Wb35Reg_ReadSync(struct hw_data *hw_data, u16 register_no,
+				   u32 *register_value);
+unsigned char Wb35Reg_Write(struct hw_data *hw_data, u16 register_no,
+				   u32 register_value);
+unsigned char Wb35Reg_WriteSync(struct hw_data *hw_data, u16 register_no,
+				   u32 register_value);
 unsigned char Wb35Reg_WriteWithCallbackValue(struct hw_data *hw_data,
 							 u16 register_no,
 							 u32 register_value,
@@ -59,7 +64,8 @@ void CardGetMulticastBit(u8 address[MAC_ADDR_LENGTH], u8 *byte, u8 *value);
 u32 CardComputeCrc(u8 *buffer, u32 length);
 
 void Wb35Reg_phy_calibration(struct hw_data *hw_data);
-void Wb35Reg_Update(struct hw_data *hw_data, u16 register_no, u32 register_value);
+void Wb35Reg_Update(struct hw_data *hw_data, u16 register_no,
+			   u32 register_value);
 unsigned char adjust_TXVGA_for_iq_mag(struct hw_data *hw_data);
 
 #endif
-- 
1.8.1.2


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

* [PATCH 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (15 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 16/24] Staging: winbond: wb35reg_f: fixed " Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Deleted an space before a tabulation.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35reg_s.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/winbond/wb35reg_s.h b/drivers/staging/winbond/wb35reg_s.h
index dc79faa..cdbbf35 100644
--- a/drivers/staging/winbond/wb35reg_s.h
+++ b/drivers/staging/winbond/wb35reg_s.h
@@ -12,7 +12,7 @@ struct hw_data;
  *			HAL setting function
  *
  *		========================================
- *		|Uxx| 	|Dxx|	|Mxx|	|BB|	|RF|
+ *		|Uxx|	|Dxx|	|Mxx|	|BB|	|RF|
  *		========================================
  *			|					|
  *		Wb35Reg_Read		Wb35Reg_Write
-- 
1.8.1.2


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

* [PATCH 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (16 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters Iker Pedrosa
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35rx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
index 8d71bc2..48ed95c 100644
--- a/drivers/staging/winbond/wb35rx.c
+++ b/drivers/staging/winbond/wb35rx.c
@@ -339,9 +339,9 @@ void Wb35Rx_destroy(struct hw_data *pHwData)
 	struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
 
 	do {
-		msleep(10); /* Delay for waiting function enter */
+		usleep(10000); /* Delay for waiting function enter */
 	} while (pWb35Rx->EP3vm_state != VM_STOP);
-	msleep(10); /* Delay for waiting function exit */
+	usleep(10000); /* Delay for waiting function exit */
 
 	usb_free_urb(pWb35Rx->RxUrb);
 	pr_debug("Wb35Rx_destroy OK\n");
-- 
1.8.1.2


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

* [PATCH 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (17 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Fixed some lines over 80 characters.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35rx.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
index 48ed95c..999b7046 100644
--- a/drivers/staging/winbond/wb35rx.c
+++ b/drivers/staging/winbond/wb35rx.c
@@ -16,7 +16,8 @@
 #include "core.h"
 #include "wb35rx_f.h"
 
-static void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
+static void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress,
+				int PacketSize)
 {
 	struct wbsoft_priv *priv = hw->priv;
 	struct sk_buff *skb;
@@ -306,7 +307,9 @@ static void Wb35Rx_reset_descriptor(struct hw_data *pHwData)
 	pWb35Rx->EP3vm_state = VM_STOP;
 	pWb35Rx->rx_halt = 0;
 
-	/* Initial the Queue. The last buffer is reserved for used if the Rx resource is unavailable. */
+	/* Initial the Queue. The last buffer is reserved for used if the Rx
+	 * resource is unavailable.
+	*/
 	for (i = 0; i < MAX_USB_RX_BUFFER_NUMBER; i++)
 		pWb35Rx->RxOwner[i] = 1;
 }
-- 
1.8.1.2


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

* [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (18 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-27 23:38   ` Greg KH
  2013-08-26 15:10 ` [PATCH 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
                   ` (5 subsequent siblings)
  25 siblings, 1 reply; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
index 30a77cc..8c25cbd 100644
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -166,9 +166,9 @@ void Wb35Tx_destroy(struct hw_data *pHwData)
 
 	/* Wait for VM stop */
 	do {
-		msleep(10); /* Delay for waiting function enter 940623.1.a */
+		usleep(10000); /* Delay for waiting function enter 940623.1.a */
 	} while ((pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP));
-	msleep(10); /* Delay for waiting function enter 940623.1.b */
+	usleep(10000); /* Delay for waiting function enter 940623.1.b */
 
 	usb_free_urb(pWb35Tx->Tx4Urb);
 	usb_free_urb(pWb35Tx->Tx2Urb);
-- 
1.8.1.2


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

* [PATCH 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (19 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '[' Iker Pedrosa
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

The previously used printk lacked the warning level, now we've got a more accurate way to know the error.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35tx.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
index 8c25cbd..18b28f2 100644
--- a/drivers/staging/winbond/wb35tx.c
+++ b/drivers/staging/winbond/wb35tx.c
@@ -32,7 +32,7 @@ static void Wb35Tx_complete(struct urb *pUrb)
 	struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
 	struct wb35_mds *pMds = &adapter->Mds;
 
-	printk("wb35: tx complete\n");
+	netdev_err(pUrb->dev, "wb35: tx complete\n");
 	/* Variable setting */
 	pWb35Tx->EP4vm_state = VM_COMPLETED;
 	pWb35Tx->EP4VM_status = pUrb->status; /* Store the last result of Irp */
@@ -49,7 +49,7 @@ static void Wb35Tx_complete(struct urb *pUrb)
 
 	/* The URB is completed, check the result */
 	if (pWb35Tx->EP4VM_status != 0) {
-		printk("URB submission failed\n");
+		netdev_err(pUrb->dev, "URB submission failed\n");
 		pWb35Tx->EP4vm_state = VM_STOP;
 		goto error;
 	}
@@ -96,7 +96,7 @@ static void Wb35Tx(struct wbsoft_priv *adapter)
 	pWb35Tx->EP4vm_state = VM_RUNNING;
 	retv = usb_submit_urb(pUrb, GFP_ATOMIC);
 	if (retv < 0) {
-		printk("EP4 Tx Irp sending error\n");
+		netdev_err(pUrb->dev, "EP4 Tx Irp sending error\n");
 		goto cleanup;
 	}
 
@@ -218,7 +218,7 @@ static void Wb35Tx_EP2VM_complete(struct urb *pUrb)
 
 	/* The Urb is completed, check the result */
 	if (pWb35Tx->EP2VM_status != 0) {
-		printk("EP2 IoCompleteRoutine return error\n");
+		netdev_err(pUrb->dev, "EP2 IoCompleteRoutine return error\n");
 		pWb35Tx->EP2vm_state = VM_STOP;
 		goto error;
 	}
-- 
1.8.1.2


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

* [PATCH 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '['
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (20 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 15:10 ` [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Erased the spaces that existed after opening some square brackets '['.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wb35tx_s.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/winbond/wb35tx_s.h b/drivers/staging/winbond/wb35tx_s.h
index 715f87d..dc12008 100644
--- a/drivers/staging/winbond/wb35tx_s.h
+++ b/drivers/staging/winbond/wb35tx_s.h
@@ -12,7 +12,7 @@
 /* Internal variable for module */
 struct wb35_tx {
 	/* For Tx buffer */
-	u8	TxBuffer[ MAX_USB_TX_BUFFER_NUMBER ][ MAX_USB_TX_BUFFER ];
+	u8	TxBuffer[MAX_USB_TX_BUFFER_NUMBER][MAX_USB_TX_BUFFER];
 
 	/* For Interrupt pipe */
 	u8	EP2_buf[MAX_INTERRUPT_LENGTH];
-- 
1.8.1.2


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

* [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (21 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '[' Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 16:39   ` Dan Carpenter
  2013-08-26 15:10 ` [PATCH 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (2 subsequent siblings)
  25 siblings, 1 reply; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

Fixed some lines over 80 characters.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wbusb.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index 3fa1ae4..c128bc9 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -169,7 +169,8 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off)
 	Wb35Reg_Write(pHwData, 0x0824, reg->M24_MacControl);
 }
 
-static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info channel)
+static void hal_set_current_channel_ex(struct hw_data *pHwData,
+					       struct chan_info channel)
 {
 	struct wb35_reg *reg = &pHwData->reg;
 
@@ -186,7 +187,8 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info
 				       sizeof(struct chan_info));
 }
 
-static void hal_set_current_channel(struct hw_data *pHwData, struct chan_info channel)
+static void hal_set_current_channel(struct hw_data *pHwData,
+					    struct chan_info channel)
 {
 	hal_set_current_channel_ex(pHwData, channel);
 }
@@ -206,7 +208,9 @@ static void hal_set_accept_broadcast(struct hw_data *pHwData, u8 enable)
 	Wb35Reg_Write(pHwData, 0x0800, reg->M00_MacControl);
 }
 
-/* For wep key error detection, we need to accept broadcast packets to be received temporary. */
+/* For wep key error detection, we need to accept broadcast packets to be
+ * received temporary.
+*/
 static void hal_set_accept_promiscuous(struct hw_data *pHwData, u8 enable)
 {
 	struct wb35_reg *reg = &pHwData->reg;
@@ -290,7 +294,8 @@ static const struct ieee80211_ops wbsoft_ops = {
 	.get_tsf		= wbsoft_get_tsf,
 };
 
-static void hal_set_ethernet_address(struct hw_data *pHwData, u8 *current_address)
+static void hal_set_ethernet_address(struct hw_data *pHwData,
+					     u8 *current_address)
 {
 	u32 ltmp[2];
 
@@ -305,7 +310,8 @@ static void hal_set_ethernet_address(struct hw_data *pHwData, u8 *current_addres
 	Wb35Reg_BurstWrite(pHwData, 0x03e8, ltmp, 2, AUTO_INCREMENT);
 }
 
-static void hal_get_permanent_address(struct hw_data *pHwData, u8 *pethernet_address)
+static void hal_get_permanent_address(struct hw_data *pHwData,
+					      u8 *pethernet_address)
 {
 	if (pHwData->SurpriseRemove)
 		return;
-- 
1.8.1.2


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

* [PATCH 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (22 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
@ 2013-08-26 15:10 ` Iker Pedrosa
  2013-08-26 16:43 ` [PATCH 00/24] Staging: winbond: Fixed some coding style issues Dan Carpenter
  2013-08-30 11:55 ` Pavel Machek
  25 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-26 15:10 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, justinmattock, harsh1kumar, dan.carpenter,
	mujeeb.adil, devel, linux-kernel

According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.

Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
 drivers/staging/winbond/wbusb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c128bc9..a2140da 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -717,7 +717,7 @@ static int wb35_hw_init(struct ieee80211_hw *hw)
 
 	/* Waiting for HAL setting OK */
 	while (!hal_idle(pHwData))
-		msleep(10);
+		usleep(10000);
 
 	MTO_Init(priv);
 
-- 
1.8.1.2


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

* Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
  2013-08-26 15:10 ` [PATCH 05/24] " Iker Pedrosa
@ 2013-08-26 16:02   ` Dan Carpenter
  2013-08-26 16:50     ` Joe Perches
  2013-08-27 23:46   ` Greg KH
  1 sibling, 1 reply; 37+ messages in thread
From: Dan Carpenter @ 2013-08-26 16:02 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, gregkh, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock

On Mon, Aug 26, 2013 at 05:10:04PM +0200, Iker Pedrosa wrote:
> Second of the patches that fixes the lines over 80 characters in phy_calibration.c
> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/staging/winbond/phy_calibration.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
> index 6635c85..a4f3773 100644
> --- a/drivers/staging/winbond/phy_calibration.c
> +++ b/drivers/staging/winbond/phy_calibration.c
> @@ -1233,8 +1233,10 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
>  		b_2 = (rot_image_q_b * 32768) / rot_tone_i_b -
>  			phw_data->iq_rsdl_phase_tx_d2;
>  
> -		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n", phw_data->iq_rsdl_gain_tx_d2));
> -		PHY_DEBUG(("[CAL]    ** iq_rsdl_phase_tx_d2= %d\n", phw_data->iq_rsdl_phase_tx_d2));
> +		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n",
> +				   phw_data->iq_rsdl_gain_tx_d2));

Don't redo this, but really these should be aligned like this:

		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n",
			   phw_data->iq_rsdl_gain_tx_d2));

In the end, we're going to remove all these debugging prints so it's
not worth redoing in a later patch.  What you have is fine.  The
message itself is sort of nonsense.

> +		PHY_DEBUG(("[CAL]    ** iq_rsdl_phase_tx_d2= %d\n",
> +				   phw_data->iq_rsdl_phase_tx_d2));
>  		PHY_DEBUG(("[CAL]    ***** EPSILON/2 = %d\n", a_2));
>  		PHY_DEBUG(("[CAL]    ***** THETA/2   = %d\n", b_2));
>  
> @@ -1280,7 +1282,8 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
>  
>  		/* e. */
>  		pwr_tone = (iqcal_tone_i*iqcal_tone_i + iqcal_tone_q*iqcal_tone_q);
> -		pwr_image = (iqcal_image_i*iqcal_image_i + iqcal_image_q*iqcal_image_q)*factor;
> +		pwr_image = (iqcal_image_i*iqcal_image_i +
> +				   iqcal_image_q*iqcal_image_q)*factor;

Don't resend, eventually, someone will have to fix these across the
whole driver but this should be:

		pwr_image = (iqcal_image_i * iqcal_image_i +
		             iqcal_image_q * iqcal_image_q) * factor;


I've changed the alignment and added spaces around the math
operations.

regards,
dan carpenter


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

* Re: [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:10 ` [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters Iker Pedrosa
@ 2013-08-26 16:12   ` Dan Carpenter
  2013-08-26 16:20   ` Dan Carpenter
  1 sibling, 0 replies; 37+ messages in thread
From: Dan Carpenter @ 2013-08-26 16:12 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, gregkh, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock

On Mon, Aug 26, 2013 at 05:10:08PM +0200, Iker Pedrosa wrote:
> First of the patches that fixes the lines over 80 characters in reg.c
> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/staging/winbond/reg.c | 30 +++++++++++++++++-------------
>  1 file changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
> index 61916f5..b1d977a 100644
> --- a/drivers/staging/winbond/reg.c
> +++ b/drivers/staging/winbond/reg.c
> @@ -809,12 +809,12 @@ u32 w89rf242_txvga_data[][5] = {
>  	{(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242}
>  };
>  
> -/* ================================================================================================== */
> +/* ========================================================================= */

Just delete these.  They are not kernel style.

regards,
dan carpenter


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

* Re: [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters
  2013-08-26 15:10 ` [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters Iker Pedrosa
  2013-08-26 16:12   ` Dan Carpenter
@ 2013-08-26 16:20   ` Dan Carpenter
  1 sibling, 0 replies; 37+ messages in thread
From: Dan Carpenter @ 2013-08-26 16:20 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, gregkh, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock

On Mon, Aug 26, 2013 at 05:10:08PM +0200, Iker Pedrosa wrote:
> @@ -926,7 +928,8 @@ static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,
>  	u8	i;
>  	for (i = 0; i < number; i++) {
>  		pHwData->phy_para[i] = al7230_rf_data_24[i];
> -		pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_rf_data_24[i] & 0xffffff);
> +		pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24)
> +				   | (al7230_rf_data_24[i] & 0xffffff);

It's always a bit hard for me to know how picky to be.  Normally the '|'
would be on the first line here.

regards,
dan carpenter


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

* Re: [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters
  2013-08-26 15:10 ` [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
@ 2013-08-26 16:39   ` Dan Carpenter
  0 siblings, 0 replies; 37+ messages in thread
From: Dan Carpenter @ 2013-08-26 16:39 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, gregkh, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock

On Mon, Aug 26, 2013 at 05:10:22PM +0200, Iker Pedrosa wrote:
> Fixed some lines over 80 characters.
> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/staging/winbond/wbusb.c | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
> index 3fa1ae4..c128bc9 100644
> --- a/drivers/staging/winbond/wbusb.c
> +++ b/drivers/staging/winbond/wbusb.c
> @@ -169,7 +169,8 @@ static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off)
>  	Wb35Reg_Write(pHwData, 0x0824, reg->M24_MacControl);
>  }
>  
> -static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info channel)
> +static void hal_set_current_channel_ex(struct hw_data *pHwData,
> +					       struct chan_info channel)


These should be aligned like this:

static void hal_set_current_channel_ex(struct hw_data *pHwData,
				       struct chan_info channel)
{


regards,
dan carpenter

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

* Re: [PATCH 00/24] Staging: winbond: Fixed some coding style issues
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (23 preceding siblings ...)
  2013-08-26 15:10 ` [PATCH 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-08-26 16:43 ` Dan Carpenter
  2013-08-27 14:54   ` Iker Pedrosa
  2013-08-30 11:55 ` Pavel Machek
  25 siblings, 1 reply; 37+ messages in thread
From: Dan Carpenter @ 2013-08-26 16:43 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, gregkh, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock

Btw, all the white space nit-pick I pointed out were pretty minor.  I
don't like making people redo stuff so you can fix anything you want to
in later patches.

regards,
dan carpenter


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

* Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
  2013-08-26 16:02   ` Dan Carpenter
@ 2013-08-26 16:50     ` Joe Perches
  2013-09-05 11:45       ` Pavel Machek
  0 siblings, 1 reply; 37+ messages in thread
From: Joe Perches @ 2013-08-26 16:50 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Iker Pedrosa, pavel, devel, gregkh, harsh1kumar, linux-kernel,
	mujeeb.adil, justinmattock

On Mon, 2013-08-26 at 19:02 +0300, Dan Carpenter wrote:
> On Mon, Aug 26, 2013 at 05:10:04PM +0200, Iker Pedrosa wrote:
[]
> > diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
[]
> > @@ -1233,8 +1233,10 @@ u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 fre
> >  		b_2 = (rot_image_q_b * 32768) / rot_tone_i_b -
> >  			phw_data->iq_rsdl_phase_tx_d2;
> >  
> > -		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n", phw_data->iq_rsdl_gain_tx_d2));
> > -		PHY_DEBUG(("[CAL]    ** iq_rsdl_phase_tx_d2= %d\n", phw_data->iq_rsdl_phase_tx_d2));
> > +		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n",
> > +				   phw_data->iq_rsdl_gain_tx_d2));
> 
> Don't redo this, but really these should be aligned like this:
> 
> 		PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n",
> 			   phw_data->iq_rsdl_gain_tx_d2));
> 
> In the end, we're going to remove all these debugging prints so it's
> not worth redoing in a later patch.  What you have is fine.  The
> message itself is sort of nonsense.

Especially true because the only #define for PHY_DEBUG is:

#define PHY_DEBUG(msg, args...)

None of this does anything anyway.

It'd be better to send a removal of the whole lot.

Does anyone still use this driver?



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

* Re: [PATCH 00/24] Staging: winbond: Fixed some coding style issues
  2013-08-26 16:43 ` [PATCH 00/24] Staging: winbond: Fixed some coding style issues Dan Carpenter
@ 2013-08-27 14:54   ` Iker Pedrosa
  0 siblings, 0 replies; 37+ messages in thread
From: Iker Pedrosa @ 2013-08-27 14:54 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: pavel, devel, gregkh, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock

On Mon, 26 Aug 2013 19:43:06 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> Btw, all the white space nit-pick I pointed out were pretty minor.  I
> don't like making people redo stuff so you can fix anything you want to
> in later patches.
> 
> regards,
> dan carpenter
> 

I write it down for the next series of patches but I will wait to start them until the previous are accepted.

-- 
Regards,

Iker Pedrosa <ikerpedrosam@gmail.com>

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

* Re: [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep
  2013-08-26 15:10 ` [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-08-27 23:38   ` Greg KH
  0 siblings, 0 replies; 37+ messages in thread
From: Greg KH @ 2013-08-27 23:38 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, justinmattock, harsh1kumar, dan.carpenter, mujeeb.adil,
	devel, linux-kernel

On Mon, Aug 26, 2013 at 05:10:07PM +0200, Iker Pedrosa wrote:
> According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/staging/winbond/reg.c | 52 +++++++++++++++++++++----------------------
>  1 file changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
> index 80b4b34..61916f5 100644
> --- a/drivers/staging/winbond/reg.c
> +++ b/drivers/staging/winbond/reg.c
> @@ -890,9 +890,9 @@ void Uxx_power_on_procedure(struct hw_data *pHwData)
>  	else {
>  		Wb35Reg_WriteSync(pHwData, 0x03f4, 0xFF5807FF);
>  		Wb35Reg_WriteSync(pHwData, 0x03d4, 0x80); /* regulator on only */
> -		msleep(10);
> +		usleep(10000);

This breaks the build :(


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

* Re: [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep
  2013-08-26 15:10 ` [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-08-27 23:38   ` Greg KH
  0 siblings, 0 replies; 37+ messages in thread
From: Greg KH @ 2013-08-27 23:38 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock, dan.carpenter

On Mon, Aug 26, 2013 at 05:10:19PM +0200, Iker Pedrosa wrote:
> According to the documentation it is not recommended to use msleep for 1ms - 20ms because it may sleep longer than 20ms. So, it is recommended to use usleep instead.
> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
> ---
>  drivers/staging/winbond/wb35tx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
> index 30a77cc..8c25cbd 100644
> --- a/drivers/staging/winbond/wb35tx.c
> +++ b/drivers/staging/winbond/wb35tx.c
> @@ -166,9 +166,9 @@ void Wb35Tx_destroy(struct hw_data *pHwData)
>  
>  	/* Wait for VM stop */
>  	do {
> -		msleep(10); /* Delay for waiting function enter 940623.1.a */
> +		usleep(10000); /* Delay for waiting function enter 940623.1.a */

It looks like you didn't try to build this patch, as it breaks the build
for me here :(

greg k-h

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

* Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
  2013-08-26 15:10 ` [PATCH 05/24] " Iker Pedrosa
  2013-08-26 16:02   ` Dan Carpenter
@ 2013-08-27 23:46   ` Greg KH
  1 sibling, 0 replies; 37+ messages in thread
From: Greg KH @ 2013-08-27 23:46 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, harsh1kumar, linux-kernel, mujeeb.adil,
	justinmattock, dan.carpenter

On Mon, Aug 26, 2013 at 05:10:04PM +0200, Iker Pedrosa wrote:
> Second of the patches that fixes the lines over 80 characters in phy_calibration.c
> 
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>

This Subject: is identical to the previous patch, not good.

You also do that for 4 other patches in this series :(

Can you please redo all of these, fixing the subjects, and the build
errors (which wasn't good at all), and resend them?

thanks,

greg k-h

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

* Re: [PATCH 00/24] Staging: winbond: Fixed some coding style issues
  2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (24 preceding siblings ...)
  2013-08-26 16:43 ` [PATCH 00/24] Staging: winbond: Fixed some coding style issues Dan Carpenter
@ 2013-08-30 11:55 ` Pavel Machek
  25 siblings, 0 replies; 37+ messages in thread
From: Pavel Machek @ 2013-08-30 11:55 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: gregkh, justinmattock, harsh1kumar, dan.carpenter, mujeeb.adil,
	devel, linux-kernel

On Mon 2013-08-26 17:09:59, Iker Pedrosa wrote:
> Fixes some coding style issues from drivers/staging/winbond

Acked-by: Pavel Machek <pavel@ucw.cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH 05/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters
  2013-08-26 16:50     ` Joe Perches
@ 2013-09-05 11:45       ` Pavel Machek
  0 siblings, 0 replies; 37+ messages in thread
From: Pavel Machek @ 2013-09-05 11:45 UTC (permalink / raw)
  To: Joe Perches
  Cc: Dan Carpenter, Iker Pedrosa, devel, gregkh, harsh1kumar,
	linux-kernel, mujeeb.adil, justinmattock

Hi!

> It'd be better to send a removal of the whole lot.
> 
> Does anyone still use this driver?

I do have the hardware, in subnotebook with terrible keyboard. So I do
not use it a lot.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

end of thread, other threads:[~2013-09-05 11:45 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-26 15:09 [PATCH 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
2013-08-26 15:10 ` [PATCH 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
2013-08-26 15:10 ` [PATCH 02/24] Staging: winbond: mto: avoided use of extern functions Iker Pedrosa
2013-08-26 15:10 ` [PATCH 03/24] Staging: winbond: mto: deleted " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 04/24] Staging: winbond: phy_calibration: fixed some lines over 80 characters Iker Pedrosa
2013-08-26 15:10 ` [PATCH 05/24] " Iker Pedrosa
2013-08-26 16:02   ` Dan Carpenter
2013-08-26 16:50     ` Joe Perches
2013-09-05 11:45       ` Pavel Machek
2013-08-27 23:46   ` Greg KH
2013-08-26 15:10 ` [PATCH 06/24] Staging: winbond: reg: erased trailing whitespace Iker Pedrosa
2013-08-26 15:10 ` [PATCH 07/24] Staging: winbond: reg: white space deleted Iker Pedrosa
2013-08-26 15:10 ` [PATCH 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
2013-08-27 23:38   ` Greg KH
2013-08-26 15:10 ` [PATCH 09/24] Staging: winbond: reg: fixed some lines over 80 characters Iker Pedrosa
2013-08-26 16:12   ` Dan Carpenter
2013-08-26 16:20   ` Dan Carpenter
2013-08-26 15:10 ` [PATCH 10/24] " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 11/24] " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 12/24] " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 13/24] " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 14/24] " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 15/24] " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 16/24] Staging: winbond: wb35reg_f: fixed " Iker Pedrosa
2013-08-26 15:10 ` [PATCH 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation Iker Pedrosa
2013-08-26 15:10 ` [PATCH 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep Iker Pedrosa
2013-08-26 15:10 ` [PATCH 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters Iker Pedrosa
2013-08-26 15:10 ` [PATCH 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
2013-08-27 23:38   ` Greg KH
2013-08-26 15:10 ` [PATCH 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
2013-08-26 15:10 ` [PATCH 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '[' Iker Pedrosa
2013-08-26 15:10 ` [PATCH 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
2013-08-26 16:39   ` Dan Carpenter
2013-08-26 15:10 ` [PATCH 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep Iker Pedrosa
2013-08-26 16:43 ` [PATCH 00/24] Staging: winbond: Fixed some coding style issues Dan Carpenter
2013-08-27 14:54   ` Iker Pedrosa
2013-08-30 11:55 ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).