linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues
@ 2013-09-16 13:43 Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
                   ` (23 more replies)
  0 siblings, 24 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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: first of the patches that fixes
    lines over 80 characters
  Staging: winbond: phy_calibration: second of the patches that fixes
    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: first of the patches that fixes lines over 80
    characters
  Staging: winbond: reg: second of the patches that fixes lines over 80
    characters
  Staging: winbond: reg: third of the patches that fixes lines over 80
    characters
  Staging: winbond: reg: fourth of the patches that fixes lines over 80
    characters
  Staging: winbond: reg: fifth of the patches that fixes lines over 80
    characters
  Staging: winbond: reg: sixth of the patches that fixes lines over 80
    characters
  Staging: winbond: reg: seventh of the patches that fixes 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             | 272 ++++++++++++++++++------------
 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, 239 insertions(+), 169 deletions(-)

-- 
1.8.1.2


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

* [PATCH v2 01/24] Staging: winbond: mto: removed function declaration
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 02/24] Staging: winbond: mto: avoided use of extern functions Iker Pedrosa
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 02/24] Staging: winbond: mto: avoided use of extern functions
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 03/24] Staging: winbond: mto: deleted " Iker Pedrosa
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 03/24] Staging: winbond: mto: deleted extern functions
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 02/24] Staging: winbond: mto: avoided use of extern functions Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 04/24] Staging: winbond: phy_calibration: first of the patches that fixes lines over 80 characters Iker Pedrosa
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 04/24] Staging: winbond: phy_calibration: first of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (2 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 03/24] Staging: winbond: mto: deleted " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 05/24] Staging: winbond: phy_calibration: second " Iker Pedrosa
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 05/24] Staging: winbond: phy_calibration: second of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (3 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 04/24] Staging: winbond: phy_calibration: first of the patches that fixes lines over 80 characters Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 06/24] Staging: winbond: reg: erased trailing whitespace Iker Pedrosa
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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..7fc95ee 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] 32+ messages in thread

* [PATCH v2 06/24] Staging: winbond: reg: erased trailing whitespace
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (4 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 05/24] Staging: winbond: phy_calibration: second " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 07/24] Staging: winbond: reg: white space deleted Iker Pedrosa
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 07/24] Staging: winbond: reg: white space deleted
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (5 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 06/24] Staging: winbond: reg: erased trailing whitespace Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (6 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 07/24] Staging: winbond: reg: white space deleted Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-25 23:44   ` Greg KH
  2013-09-16 13:43 ` [PATCH v2 09/24] Staging: winbond: reg: first of the patches that fixes lines over 80 characters Iker Pedrosa
                   ` (15 subsequent siblings)
  23 siblings, 1 reply; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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.

In the first revision Greg KH pointed out that this change broke the build. In my computer it builds properly so if someone has the same problem please copy the output so that I can figure out what is the problem.

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

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index 80b4b34..c023fda 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);
-		Wb35Reg_WriteSync(pHwData, 0x03d4, 0xb8); /* REG_ON RF_RSTN on, and */
-		msleep(10);
+		usleep(10000);
+		Wb35Reg_WriteSync(pHwData, 0x03d4, 0xb8); /* REG_ON RF_RSTN on */
+		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] 32+ messages in thread

* [PATCH v2 09/24] Staging: winbond: reg: first of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (7 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 10/24] Staging: winbond: reg: second " Iker Pedrosa
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
index c023fda..429c28e 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -809,12 +809,7 @@ u32 w89rf242_txvga_data[][5] = {
 	{(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242}
 };
 
-/* ================================================================================================== */
-
-
-
 /*
- * =============================================================================================================
  *  Uxx_ReadEthernetAddress --
  *
  *  Routine Description:
@@ -826,15 +821,15 @@ 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 +847,17 @@ 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 +920,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 +931,14 @@ 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] 32+ messages in thread

* [PATCH v2 10/24] Staging: winbond: reg: second of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (8 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 09/24] Staging: winbond: reg: first of the patches that fixes lines over 80 characters Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 11/24] Staging: winbond: reg: third " Iker Pedrosa
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 429c28e..a65e8ce 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -964,42 +964,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:
@@ -1020,7 +1026,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;
 	}
@@ -1047,10 +1054,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:
@@ -1064,7 +1073,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] 32+ messages in thread

* [PATCH v2 11/24] Staging: winbond: reg: third of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (9 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 10/24] Staging: winbond: reg: second " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 12/24] Staging: winbond: reg: fourth " Iker Pedrosa
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 a65e8ce..6aae4da 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1083,15 +1083,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);
@@ -1149,30 +1152,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] 32+ messages in thread

* [PATCH v2 12/24] Staging: winbond: reg: fourth of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (10 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 11/24] Staging: winbond: reg: third " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 13/24] Staging: winbond: reg: fifth " Iker Pedrosa
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 6aae4da..6d2ab1e 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1187,46 +1187,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] 32+ messages in thread

* [PATCH v2 13/24] Staging: winbond: reg: fifth of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (11 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 12/24] Staging: winbond: reg: fourth " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 14/24] Staging: winbond: reg: sixth " Iker Pedrosa
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 6d2ab1e..11b155f 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1242,46 +1242,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] 32+ messages in thread

* [PATCH v2 14/24] Staging: winbond: reg: sixth of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (12 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 13/24] Staging: winbond: reg: fifth " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 15/24] Staging: winbond: reg: seventh " Iker Pedrosa
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 11b155f..e51530e 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -1728,7 +1728,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 */
@@ -1881,9 +1882,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 */
@@ -1958,7 +1959,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;
 }
@@ -1968,7 +1970,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;
 }
@@ -1978,7 +1981,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;
 }
@@ -1988,7 +1992,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;
 }
@@ -1998,7 +2003,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;
 }
@@ -2016,7 +2022,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;
 }
@@ -2033,7 +2040,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] 32+ messages in thread

* [PATCH v2 15/24] Staging: winbond: reg: seventh of the patches that fixes lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (13 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 14/24] Staging: winbond: reg: sixth " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
       [not found]   ` <CANBXnMm7QCab3cU4NMzmA3OjXckcUx5dakyD_TRwfj3j2_02MA@mail.gmail.com>
  2013-09-16 13:43 ` [PATCH v2 16/24] Staging: winbond: wb35reg_f: fixed " Iker Pedrosa
                   ` (8 subsequent siblings)
  23 siblings, 1 reply; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 e51530e..3b19da8 100644
--- a/drivers/staging/winbond/reg.c
+++ b/drivers/staging/winbond/reg.c
@@ -2060,7 +2060,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 */
@@ -2136,11 +2137,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;
 
@@ -2163,7 +2168,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++)
@@ -2235,10 +2242,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] 32+ messages in thread

* [PATCH v2 16/24] Staging: winbond: wb35reg_f: fixed lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (14 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 15/24] Staging: winbond: reg: seventh " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation Iker Pedrosa
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (15 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 16/24] Staging: winbond: wb35reg_f: fixed " Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (16 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters Iker Pedrosa
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (17 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (18 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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.

In the first revision Greg KH pointed out that this change broke the build. In my computer it builds properly so if someone has the same problem please copy the output so that I can figure out what is the problem.

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] 32+ messages in thread

* [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (19 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-17 16:35   ` Joe Perches
  2013-09-25 14:39   ` [PATCH v3 21/24] Staging: winbond: wb35tx: Replace printk with netdev Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '[' Iker Pedrosa
                   ` (2 subsequent siblings)
  23 siblings, 2 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '['
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (20 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep Iker Pedrosa
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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] 32+ messages in thread

* [PATCH v2 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (21 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '[' Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  2013-09-16 13:43 ` [PATCH v2 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep Iker Pedrosa
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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..a2868f2 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] 32+ messages in thread

* [PATCH v2 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep
  2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
                   ` (22 preceding siblings ...)
  2013-09-16 13:43 ` [PATCH v2 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
@ 2013-09-16 13:43 ` Iker Pedrosa
  23 siblings, 0 replies; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-16 13:43 UTC (permalink / raw)
  To: pavel
  Cc: gregkh, ikerpedrosam, 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 a2868f2..f23bc1d 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] 32+ messages in thread

* Re: [PATCH v2 15/24] Staging: winbond: reg: seventh of the patches that fixes lines over 80 characters
       [not found]   ` <CANBXnMm7QCab3cU4NMzmA3OjXckcUx5dakyD_TRwfj3j2_02MA@mail.gmail.com>
@ 2013-09-17  9:43     ` Dan Carpenter
  2013-09-20 14:45       ` Iker Pedrosa
  0 siblings, 1 reply; 32+ messages in thread
From: Dan Carpenter @ 2013-09-17  9:43 UTC (permalink / raw)
  To: Adil Mujeeb
  Cc: Iker Pedrosa, Pavel Machek, Greg KH, harsh1kumar, devel, linux-kernel

On Tue, Sep 17, 2013 at 02:29:22PM +0530, Adil Mujeeb wrote:
> Hi,
> 
> 
> >-       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);
> .....
> .....
> 
> >-       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;
> 
> I think consistency is needed. Either break the lines putting the OR
> operator ( | ) at the start of new line or at the end of each line. People
> has its own preference but here you have used both style in single file.
> Just a suggestion.
> 

Put the '|' character at the end of the line.  That's the New Unwritten
Style Guidelines.  Most of the kernel does it this way and it's easier
to read.

But this could be fixed in a later patch instead of redoing the whole
series.

regards,
dan carpenter


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

* Re: [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err
  2013-09-16 13:43 ` [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
@ 2013-09-17 16:35   ` Joe Perches
  2013-09-25 14:39   ` [PATCH v3 21/24] Staging: winbond: wb35tx: Replace printk with netdev Iker Pedrosa
  1 sibling, 0 replies; 32+ messages in thread
From: Joe Perches @ 2013-09-17 16:35 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, gregkh, harsh1kumar, dan.carpenter, mujeeb.adil, devel,
	linux-kernel

On Mon, 2013-09-16 at 15:43 +0200, Iker Pedrosa wrote:
> The previously used printk lacked the warning level, now we've got a more accurate way to know the error.
[]
> diff --git 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");

This one should either be removed or changed to netdev_dbg
with the "wb35: " prefix removed.


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

* Re: [PATCH v2 15/24] Staging: winbond: reg: seventh of the patches that fixes lines over 80 characters
  2013-09-17  9:43     ` Dan Carpenter
@ 2013-09-20 14:45       ` Iker Pedrosa
  2013-09-21  9:32         ` Dan Carpenter
  0 siblings, 1 reply; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-20 14:45 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Adil Mujeeb, Pavel Machek, Greg KH, harsh1kumar, devel, linux-kernel

On Tue, 17 Sep 2013 12:43:26 +0300
Dan Carpenter <dan.carpenter@oracle.com> wrote:

> On Tue, Sep 17, 2013 at 02:29:22PM +0530, Adil Mujeeb wrote:
> > Hi,
> > 
> > 
> > >-       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);
> > .....
> > .....
> > 
> > >-       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;
> > 
> > I think consistency is needed. Either break the lines putting the OR
> > operator ( | ) at the start of new line or at the end of each line. People
> > has its own preference but here you have used both style in single file.
> > Just a suggestion.
> > 
> 
> Put the '|' character at the end of the line.  That's the New Unwritten
> Style Guidelines.  Most of the kernel does it this way and it's easier
> to read.
> 
> But this could be fixed in a later patch instead of redoing the whole
> series.
> 
> regards,
> dan carpenter
> 

I will change it for the new version of this patch but I want to wait some days until everybody looks the patches that I've sent.


-- 
Regards,

Iker Pedrosa <ikerpedrosam@gmail.com>

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

* Re: [PATCH v2 15/24] Staging: winbond: reg: seventh of the patches that fixes lines over 80 characters
  2013-09-20 14:45       ` Iker Pedrosa
@ 2013-09-21  9:32         ` Dan Carpenter
  0 siblings, 0 replies; 32+ messages in thread
From: Dan Carpenter @ 2013-09-21  9:32 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: devel, Greg KH, harsh1kumar, linux-kernel, Adil Mujeeb, Pavel Machek

On Fri, Sep 20, 2013 at 04:45:08PM +0200, Iker Pedrosa wrote:
> On Tue, 17 Sep 2013 12:43:26 +0300
> Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
> > On Tue, Sep 17, 2013 at 02:29:22PM +0530, Adil Mujeeb wrote:
> > > Hi,
> > > 
> > > 
> > > >-       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);
> > > .....
> > > .....
> > > 
> > > >-       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;
> > > 
> > > I think consistency is needed. Either break the lines putting the OR
> > > operator ( | ) at the start of new line or at the end of each line. People
> > > has its own preference but here you have used both style in single file.
> > > Just a suggestion.
> > > 
> > 
> > Put the '|' character at the end of the line.  That's the New Unwritten
> > Style Guidelines.  Most of the kernel does it this way and it's easier
> > to read.
> > 
> > But this could be fixed in a later patch instead of redoing the whole
> > series.
> > 
> > regards,
> > dan carpenter
> > 
> 
> I will change it for the new version of this patch but I want to wait
> some days until everybody looks the patches that I've sent.

If they haven't looked after three days then they won't look.  Greg will
look over the patches but everyone else is done.

If you can redo this patch without changing any of the others then just
redo it.  But otherwise I would prefer if you do it in a follow on
patch.  It gets tiresome to review patchsets over and over.

Joe's comment on [PATCH v2 21/24] is correct.  Technically the original
code was buggy as well, but using dev_err() means it will generate a
popup notification in Gnome so the new code is worse.  Redo that one.
Hopefully, you can just redo the one patch without redoing the following
3 patches.

So either send a single patch to Joe's comment, or send an email in
reply to Joe's comment, "Ok.  I will redo the last 4 patches".  Use the
--in-reply-to option of git to send email in reply to a thread.  Pratice
in an email to yourself before sending it to the list.

regards,
dan carpenter

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

* [PATCH v3 21/24] Staging: winbond: wb35tx: Replace printk with netdev
  2013-09-16 13:43 ` [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
  2013-09-17 16:35   ` Joe Perches
@ 2013-09-25 14:39   ` Iker Pedrosa
  2013-09-26  0:03     ` Pavel Machek
  1 sibling, 1 reply; 32+ messages in thread
From: Iker Pedrosa @ 2013-09-25 14:39 UTC (permalink / raw)
  To: pavel, gregkh, harsh1kumar, ikerpedrosam, dan.carpenter, devel,
	linux-kernel, joe

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..02e77de 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_dbg(pUrb->dev, "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] 32+ messages in thread

* Re: [PATCH v2 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep
  2013-09-16 13:43 ` [PATCH v2 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
@ 2013-09-25 23:44   ` Greg KH
  0 siblings, 0 replies; 32+ messages in thread
From: Greg KH @ 2013-09-25 23:44 UTC (permalink / raw)
  To: Iker Pedrosa
  Cc: pavel, devel, harsh1kumar, linux-kernel, mujeeb.adil, dan.carpenter

On Mon, Sep 16, 2013 at 03:43:28PM +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.
> 
> In the first revision Greg KH pointed out that this change broke the build. In my computer it builds properly so if someone has the same problem please copy the output so that I can figure out what is the problem.

Please wrap your changelog comments.

The error is:
drivers/staging/winbond/reg.c: In function ‘Uxx_power_on_procedure’:
drivers/staging/winbond/reg.c:887:3: error: implicit declaration of function ‘usleep’ [-Werror=implicit-function-declaration]

And I'm still getting it on this patch, so please fix it up, it should
be pretty obvious how to do it...

I've applied the first 7 patches here, but stopped now.  Please fix this
up and resend the remaining patches.

thanks,

greg k-h

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

* Re: [PATCH v3 21/24] Staging: winbond: wb35tx: Replace printk with netdev
  2013-09-25 14:39   ` [PATCH v3 21/24] Staging: winbond: wb35tx: Replace printk with netdev Iker Pedrosa
@ 2013-09-26  0:03     ` Pavel Machek
  0 siblings, 0 replies; 32+ messages in thread
From: Pavel Machek @ 2013-09-26  0:03 UTC (permalink / raw)
  To: Iker Pedrosa; +Cc: gregkh, harsh1kumar, dan.carpenter, devel, linux-kernel, joe

On Wed 2013-09-25 16:39:29, Iker Pedrosa wrote:
> 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>

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] 32+ messages in thread

end of thread, other threads:[~2013-09-26  0:03 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-16 13:43 [PATCH v2 00/24] Staging: winbond: Fixed some coding style issues Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 01/24] Staging: winbond: mto: removed function declaration Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 02/24] Staging: winbond: mto: avoided use of extern functions Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 03/24] Staging: winbond: mto: deleted " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 04/24] Staging: winbond: phy_calibration: first of the patches that fixes lines over 80 characters Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 05/24] Staging: winbond: phy_calibration: second " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 06/24] Staging: winbond: reg: erased trailing whitespace Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 07/24] Staging: winbond: reg: white space deleted Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 08/24] Staging: winbond: reg: changed sleep function from msleep to usleep Iker Pedrosa
2013-09-25 23:44   ` Greg KH
2013-09-16 13:43 ` [PATCH v2 09/24] Staging: winbond: reg: first of the patches that fixes lines over 80 characters Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 10/24] Staging: winbond: reg: second " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 11/24] Staging: winbond: reg: third " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 12/24] Staging: winbond: reg: fourth " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 13/24] Staging: winbond: reg: fifth " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 14/24] Staging: winbond: reg: sixth " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 15/24] Staging: winbond: reg: seventh " Iker Pedrosa
     [not found]   ` <CANBXnMm7QCab3cU4NMzmA3OjXckcUx5dakyD_TRwfj3j2_02MA@mail.gmail.com>
2013-09-17  9:43     ` Dan Carpenter
2013-09-20 14:45       ` Iker Pedrosa
2013-09-21  9:32         ` Dan Carpenter
2013-09-16 13:43 ` [PATCH v2 16/24] Staging: winbond: wb35reg_f: fixed " Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 17/24] Staging: winbond: wb35reg_s: deleted space before tabulation Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 18/24] Staging: winbond: wb35rx: changed sleep function from msleep to usleep Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 19/24] Staging: winbond: wb35rx: fixed some lines over 80 characters Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 20/24] Staging: winbond: wb35tx: changed sleep function from msleep to usleep Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 21/24] Staging: winbond: wb35tx: Replace printk with netdev_err Iker Pedrosa
2013-09-17 16:35   ` Joe Perches
2013-09-25 14:39   ` [PATCH v3 21/24] Staging: winbond: wb35tx: Replace printk with netdev Iker Pedrosa
2013-09-26  0:03     ` Pavel Machek
2013-09-16 13:43 ` [PATCH v2 22/24] Staging: winbond: wb35tx_s: erased the spaces after opening a '[' Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 23/24] Staging: winbond: wbusb: fixed some lines over 80 characters Iker Pedrosa
2013-09-16 13:43 ` [PATCH v2 24/24] Staging: winbond: wbusb: changed sleep function from msleep to usleep Iker Pedrosa

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).