[OPW,kernel] Staging: rtl8188eu: rtw_pwrctrl:Removed some checkpatch warnings
diff mbox

Message ID 1414702627-14227-1-git-send-email-suryaseetharaman.9@gmail.com
State New, archived
Headers show

Commit Message

tssurya Oct. 30, 2014, 8:57 p.m. UTC
WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
WARNING: void function return statements are not generally useful
WARNING: space prohibited before semicolon

Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Julia Lawall Oct. 30, 2014, 9:06 p.m. UTC | #1
On Fri, 31 Oct 2014, Surya Seetharaman wrote:

> WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt
> WARNING: void function return statements are not generally useful
> WARNING: space prohibited before semicolon

A patch should do one thing at a time.

julia

> Signed-off-by: Surya Seetharaman <suryaseetharaman.9@gmail.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
> index 27ed83c..95a98c7 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
> @@ -279,7 +279,6 @@ void rtw_ps_processor(struct adapter *padapter)
>  exit:
>  	rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
>  	pwrpriv->ps_processing = false;
> -	return;
>  }
>  
>  static void pwr_state_check_handler(void *FunctionContext)
> @@ -527,7 +526,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
>  
>  	pwrctrlpriv->LpsIdleCount = 0;
>  	if (padapter->registrypriv.mp_mode == 1)
> -		pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE ;
> +		pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE;
>  	else
>  		pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/*  PS_MODE_MIN; */
>  	pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? true : false;
> @@ -577,7 +576,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
>  	if (pwrpriv->ps_processing) {
>  		DBG_88E("%s wait ps_processing...\n", __func__);
>  		while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
> -			msleep(10);
> +			usleep_range(1000, 3000);
>  		if (pwrpriv->ps_processing)
>  			DBG_88E("%s wait ps_processing timeout\n", __func__);
>  		else
> -- 
> 1.9.1
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
tssurya Oct. 31, 2014, 11:04 a.m. UTC | #2
On Fri, Oct 31, 2014 at 2:36 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:

> On Fri, 31 Oct 2014, Surya Seetharaman wrote:
>
> > WARNING: msleep < 20ms can sleep for up to 20ms; see
> Documentation/timers/timers-howto.txt
> > WARNING: void function return statements are not generally useful
> > WARNING: space prohibited before semicolon
>
> A patch should do one thing at a time.
>
> julia
>
>
>
?Okay, thank you Julia, I shall generate separate patches for each of these
warnings and send them separately.?


---------
Regards.
tssurya Oct. 31, 2014, 12:01 p.m. UTC | #3
I have sent the patches separately with different subjects in new thread.
Hence dropping this thread.

Thank You.
Surya

On Fri, Oct 31, 2014 at 4:34 PM, Surya Seetharaman <
surya.seetharaman9@gmail.com> wrote:

>
> On Fri, Oct 31, 2014 at 2:36 AM, Julia Lawall <julia.lawall@lip6.fr>
> wrote:
>
>> On Fri, 31 Oct 2014, Surya Seetharaman wrote:
>>
>> > WARNING: msleep < 20ms can sleep for up to 20ms; see
>> Documentation/timers/timers-howto.txt
>> > WARNING: void function return statements are not generally useful
>> > WARNING: space prohibited before semicolon
>>
>> A patch should do one thing at a time.
>>
>> julia
>>
>>
>>
> ?Okay, thank you Julia, I shall generate separate patches for each of
> these warnings and send them separately.?
>
>
> ---------
> Regards.
>

Patch
diff mbox

diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
index 27ed83c..95a98c7 100644
--- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
@@ -279,7 +279,6 @@  void rtw_ps_processor(struct adapter *padapter)
 exit:
 	rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
 	pwrpriv->ps_processing = false;
-	return;
 }
 
 static void pwr_state_check_handler(void *FunctionContext)
@@ -527,7 +526,7 @@  void rtw_init_pwrctrl_priv(struct adapter *padapter)
 
 	pwrctrlpriv->LpsIdleCount = 0;
 	if (padapter->registrypriv.mp_mode == 1)
-		pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE ;
+		pwrctrlpriv->power_mgnt = PS_MODE_ACTIVE;
 	else
 		pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/*  PS_MODE_MIN; */
 	pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? true : false;
@@ -577,7 +576,7 @@  int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
 	if (pwrpriv->ps_processing) {
 		DBG_88E("%s wait ps_processing...\n", __func__);
 		while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
-			msleep(10);
+			usleep_range(1000, 3000);
 		if (pwrpriv->ps_processing)
 			DBG_88E("%s wait ps_processing timeout\n", __func__);
 		else