lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 05 Sep 2017 07:16:50 -0700
From:   Joe Perches <joe@...ches.com>
To:     Janani Sankara Babu <jananis37@...il.com>,
        gregkh@...uxfoundation.org
Cc:     goudapatilk@...il.com, insafonov@...il.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging:rtl8188eu Fix msleep < 20ms can sleep upto 20ms

On Tue, 2017-09-05 at 15:36 +0530, Janani Sankara Babu wrote:
> This patch solves the following warning shown by checkpatch script
> Warning: msleep < 20ms can sleep for up to 20ms 
[]
> diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
[]
> @@ -436,7 +436,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
>  			DBG_88E("%s: Wait for FW LPS leave more than %u ms!!!\n", __func__, delay_ms);
>  			break;
>  		}
> -		msleep(1);
> +		usleep_range(0, 1000);

No, that would sleep a random time up to 1 ms.

usleep_range(1000, 2000) might be OK but please
check the value passed as delay_ms.

It's only used as LPS_LEAVE_TIMEOUT_MS (100 here)
so it seems just fine to keep using msleep.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ