From: NeilBrown Date: Wed, 5 Jan 2011 01:50:16 +0000 (+1100) Subject: sched: Change wait_for_completion_*_timeout() to return a signed long X-Git-Tag: v2.6.37.1~88 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd607feccfbd54befae8ace0c4ff256d3a747010;p=pandora-kernel.git sched: Change wait_for_completion_*_timeout() to return a signed long commit 6bf4123760a5aece6e4829ce90b70b6ffd751d65 upstream. wait_for_completion_*_timeout() can return: 0: if the wait timed out -ve: if the wait was interrupted +ve: if the completion was completed. As they currently return an 'unsigned long', the last two cases are not easily distinguished which can easily result in buggy code, as is the case for the recently added wait_for_completion_interruptible_timeout() call in net/sunrpc/cache.c So change them both to return 'long'. As MAX_SCHEDULE_TIMEOUT is LONG_MAX, a large +ve return value should never overflow. Signed-off-by: NeilBrown Cc: Peter Zijlstra Cc: J. Bruce Fields Cc: Andrew Morton Cc: Linus Torvalds LKML-Reference: <20110105125016.64ccab0e@notabene.brown> Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed