Re: [PATCH] Staging: wfx: CHECK: usleep_range is preferred over udelay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 07, 2022 at 01:00:51PM -0300, Leonardo Araujo wrote:
> Fixes the checks reported by checkpatch.pl for usleep_range.
> 
> Signed-off-by: Leonardo Araujo <leonardo.aa88@xxxxxxxxx>
> ---
>  drivers/staging/wfx/bh.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c
> index a0f9d1b53019..ebc7eaf93ef0 100644
> --- a/drivers/staging/wfx/bh.c
> +++ b/drivers/staging/wfx/bh.c
> @@ -312,7 +312,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev)
>  			dev_err(wdev->dev, "time out while polling control register\n");
>  			return;
>  		}
> -		udelay(200);
> +		usleep_range(200, 200);

Do you have the hardware to verify that this is the correct fix for
this?

You can not just blindly make this type of change here, sorry, otherwise
we would have done so long ago with a simple search/replace :)

thanks,

greg k-h




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux