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]
Message-ID: <af22cf49-80d2-3ee7-c490-939065b38bfa@linaro.org>
Date:   Tue, 23 Jun 2020 19:54:53 +0300
From:   Andrey Konovalov <andrey.konovalov@...aro.org>
To:     mchehab@...nel.org, sakari.ailus@....fi,
        manivannan.sadhasivam@...aro.org
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, c.barrett@...mos.com,
        a.brela@...mos.com, peter.griffin@...aro.org
Subject: Re: [PATCH] media: i2c: imx290: replace msleep(10) with
 usleep_range(10000, 11000)

This patch should be applied on top of "[PATCH v5 00/10] Improvements to IMX290 CMOS driver" series.

Thanks,
Andrey

On 23.06.2020 19:52, Andrey Konovalov wrote:
> This fixes checkpatch warnings of "msleep < 20ms can sleep for up to 20ms".
> 
> Signed-off-by: Andrey Konovalov <andrey.konovalov@...aro.org>
> ---
>   drivers/media/i2c/imx290.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index 9c97830164e9..adcddf3204f7 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -406,7 +406,7 @@ static int imx290_set_register_array(struct imx290 *imx290,
>   	}
>   
>   	/* Provide 10ms settle time */
> -	msleep(10);
> +	usleep_range(10000, 11000);
>   
>   	return 0;
>   }
> @@ -484,14 +484,14 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
>   		if (ctrl->val) {
>   			imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW, 0x00);
>   			imx290_write_reg(imx290, IMX290_BLKLEVEL_HIGH, 0x00);
> -			msleep(10);
> +			usleep_range(10000, 11000);
>   			imx290_write_reg(imx290, IMX290_PGCTRL,
>   					 (u8)(IMX290_PGCTRL_REGEN |
>   					 IMX290_PGCTRL_THRU |
>   					 IMX290_PGCTRL_MODE(ctrl->val)));
>   		} else {
>   			imx290_write_reg(imx290, IMX290_PGCTRL, 0x00);
> -			msleep(10);
> +			usleep_range(10000, 11000);
>   			if (imx290->bpp == 10)
>   				imx290_write_reg(imx290, IMX290_BLKLEVEL_LOW,
>   						 0x3c);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ