Re: [PATCH] staging: ks7010: fix wait_for_completion_interruptible_timeout return handling

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

 



On Mon, Jul 25, 2016 at 09:21:50PM +0200, Nicholas Mc Guire wrote:
> wait_for_completion_interruptible_timeout return 0 on timeout and 
> -ERESTARTSYS if interrupted. The check for 
> !wait_for_completion_interruptible_timeout() would report an interrupt
> as timeout. Further, while HZ/50 will work most of the time it could 

Wouldn't it interpret -ERESTARTSYS as *no timeout*?

Anyway, the plain !0 comparison for me clearly shows that
'interruptible' was more copy&pasted then really planned or supported.
If it was, it would need to cancel something. Also, 20ms is pretty hard
to cancel for a user ;) Given all that and the troubles we had with
'interruptible' in the I2C subsystem, I'd much vote for dropping
interruptible here.

> fail for HZ < 50, so this is switched to msecs_to_jiffies(20).

Rest looks good, thanks!

Attachment: signature.asc
Description: PGP signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [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