Re: [PATCH 1/1] serial/uuc_uart: Set shutdown timeout to CONFIG_HZ independent 2ms

2016-12-06 Thread Timur Tabi
Alexander Stein wrote: Okay, I was just wondering why the timeout is dependant on the timer tick. That didn't seem obvious to me. Rethinking about this, I would rather replace those lines with msleep instead. What's wrong with leaving it as-is? The code is five years old, and Freescale/NXP ba

Re: [PATCH 1/1] serial/uuc_uart: Set shutdown timeout to CONFIG_HZ independent 2ms

2016-12-05 Thread Alexander Stein
On Monday 05 December 2016 10:04:27, Timur Tabi wrote: > Alexander Stein wrote: > > - schedule_timeout(2); > > + schedule_timeout(msecs_to_jiffies(2)); > > NACK. > > So I don't remember why I wrote this code, but I don't think I was > expecting it to be 2ms. Instead, I think

Re: [PATCH 1/1] serial/uuc_uart: Set shutdown timeout to CONFIG_HZ independent 2ms

2016-12-05 Thread Timur Tabi
Alexander Stein wrote: - schedule_timeout(2); + schedule_timeout(msecs_to_jiffies(2)); NACK. So I don't remember why I wrote this code, but I don't think I was expecting it to be 2ms. Instead, I think I just wanted it to be some delay, but I believed that schedul

[PATCH 1/1] serial/uuc_uart: Set shutdown timeout to CONFIG_HZ independent 2ms

2016-12-05 Thread Alexander Stein
schedule_timeout takes a timeout in jiffies resolution. So pass 2ms as a converted jiffies value. This makes the timeout independent of CONFIG_HZ. Signed-off-by: Alexander Stein --- drivers/tty/serial/ucc_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/seri