On Fri, Mar 3, 2017 at 5:14 AM, Simon Marchi wrote: > I think I understand the problem you describe by inspecting the code. However, > I have some difficulty understanding the current and proposed code, so I can't > say if the patch looks correct. It just looks more complicated than necessary. > > For example, what's the point of the timeout_remaining field in struct serial? It > seems to ever only be used in this function. If we can remove it, it will be one > less thing to consider. We can probably have just the timeout variable that we > decrement until it's done. Thank you, Simon. I only made the smallest change needed to fix the problem. I've attached an updated patch to replace the timeout_remaining field with a local variable, and remove the unused current_timeout field. Gareth