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:   Sun, 26 Jun 2022 22:44:44 +0200
From:   Philipp Hortmann <philipp.g.hortmann@...il.com>
To:     Martin Kaiser <martin@...ser.cx>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Larry Finger <Larry.Finger@...inger.net>,
        Phillip Potter <phil@...lpotter.co.uk>,
        Michael Straube <straube.linux@...il.com>,
        Pavel Skripkin <paskripkin@...il.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] staging: r8188eu: remove rtw_usleep_os

On 6/26/22 20:06, Martin Kaiser wrote:
> Remove the rtw_usleep_os helper function. There are only two callers, both
> of which call rtw_usleep_os(100). This is equivalent to msleep(1).
> 
> Signed-off-by: Martin Kaiser <martin@...ser.cx>
> ---
> changes in v2:
> - use msleep(1) instead of usleep_range
> 
>   drivers/staging/r8188eu/core/rtw_pwrctrl.c      | 2 +-
>   drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 2 +-
>   drivers/staging/r8188eu/include/osdep_service.h | 2 --
>   drivers/staging/r8188eu/os_dep/osdep_service.c  | 8 --------
>   4 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> index 45e85b593665..cf9020a73933 100644
> --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> @@ -273,7 +273,7 @@ static s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
>   			err = -1;
>   			break;
>   		}
> -		rtw_usleep_os(100);
> +		msleep(1);
>   	}
>   
>   	return err;
> diff --git a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> index 5549e7be334a..5b65313e0b9d 100644
> --- a/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> +++ b/drivers/staging/r8188eu/hal/rtl8188e_hal_init.c
> @@ -243,7 +243,7 @@ static int efuse_read_phymap_from_txpktbuf(
>   			if (reg)
>   				break;
>   
> -			rtw_usleep_os(100);
> +			msleep(1);
>   		} while (time_before(jiffies, timeout));
>   
>   		/* data from EEPROM needs to be in LE */
> diff --git a/drivers/staging/r8188eu/include/osdep_service.h b/drivers/staging/r8188eu/include/osdep_service.h
> index 1d97d5be46d5..72990a1cdc66 100644
> --- a/drivers/staging/r8188eu/include/osdep_service.h
> +++ b/drivers/staging/r8188eu/include/osdep_service.h
> @@ -76,8 +76,6 @@ void *rtw_malloc2d(int h, int w, int size);
>   		spin_lock_init(&((q)->lock));			\
>   	} while (0)
>   
> -void rtw_usleep_os(int us);
> -
>   static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
>   {
>   	return del_timer_sync(ptimer);
> diff --git a/drivers/staging/r8188eu/os_dep/osdep_service.c b/drivers/staging/r8188eu/os_dep/osdep_service.c
> index 812acd59be79..3504a0a9ba87 100644
> --- a/drivers/staging/r8188eu/os_dep/osdep_service.c
> +++ b/drivers/staging/r8188eu/os_dep/osdep_service.c
> @@ -42,14 +42,6 @@ Otherwise, there will be racing condition.
>   Caller must check if the list is empty before calling rtw_list_delete
>   */
>   
> -void rtw_usleep_os(int us)
> -{
> -	if (1 < (us / 1000))
> -		msleep(1);
> -	else
> -		msleep((us / 1000) + 1);
> -}
> -
>   static const struct device_type wlan_type = {
>   	.name = "wlan",
>   };

Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com> # Edimax N150

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ