Hi Jinjie,

On 9/3/23 10:55, Jinjie Ruan wrote:
> The timeout arg of usb_bulk_msg() is ms already and it has convert it
> to jiffies by msecs_to_jiffies() in usb_start_wait_urb(). So fix the usage
> by remove the redundant msecs_to_jiffies() in the macros.
> 
> Fixes: 77b8cabf3d52 ("drm/gm12u320: Move driver to drm/tiny")
> Signed-off-by: Jinjie Ruan <[email protected]>

Good catch, thank you.

> ---
>  drivers/gpu/drm/tiny/gm12u320.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c
> index c5bb683e440c..31fa50c665d1 100644
> --- a/drivers/gpu/drm/tiny/gm12u320.c
> +++ b/drivers/gpu/drm/tiny/gm12u320.c
> @@ -70,10 +70,10 @@ MODULE_PARM_DESC(eco_mode, "Turn on Eco mode (less 
> bright, more silent)");
>  #define READ_STATUS_SIZE             13
>  #define MISC_VALUE_SIZE                      4
>  
> -#define CMD_TIMEOUT                  msecs_to_jiffies(200)
> -#define DATA_TIMEOUT                 msecs_to_jiffies(1000)
> +#define CMD_TIMEOUT                  200
> +#define DATA_TIMEOUT                 1000
>  #define IDLE_TIMEOUT                 msecs_to_jiffies(2000)
> -#define FIRST_FRAME_TIMEOUT          msecs_to_jiffies(2000)
> +#define FIRST_FRAME_TIMEOUT          2000

Lets be consistent here and change all *_TIMEOUT defines to
be in milliseconds.

And then in the 1 place where IDLE_TIMEOUT is used, change
"IDLE_TIMEOUT" to "msecs_to_jiffies(IDLE_TIMEOUT)"

REgards,

Hans





>  
>  #define MISC_REQ_GET_SET_ECO_A               0xff
>  #define MISC_REQ_GET_SET_ECO_B               0x35

Reply via email to