From: Stephen Rothwell Date: Fri, 28 Jun 2013 06:52:58 +0000 (+1000) Subject: fix warnings from ?: operator in wait.h X-Git-Tag: next-20130628~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f2d101257bbe359e2c6b1b5d243e0be096f2a0ad;p=karo-tx-linux.git fix warnings from ?: operator in wait.h Signed-off-by: Stephen Rothwell --- diff --git a/include/linux/wait.h b/include/linux/wait.h index 1c08a6c2e2f0..f3b793da651f 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -197,7 +197,12 @@ wait_queue_head_t *bit_waitqueue(void *, int); for (;;) { \ __ret = prepare_to_wait_event(&wq, &__wait, state); \ if (condition) { \ - __ret = __wait_no_timeout(tout) ?: __tout ?: 1; \ + __ret = __wait_no_timeout(tout); \ + if (!__ret) { \ + __ret = __tout; \ + if (!__ret) \ + __ret = 1; \ + } \ break; \ } \ \ @@ -218,9 +223,14 @@ wait_queue_head_t *bit_waitqueue(void *, int); #define wait_event_common(wq, condition, state, tout) \ ({ \ long __ret; \ - if (condition) \ - __ret = __wait_no_timeout(tout) ?: (tout) ?: 1; \ - else \ + if (condition) { \ + __ret = __wait_no_timeout(tout); \ + if (!__ret) { \ + __ret = (tout); \ + if (!__ret) \ + __ret = 1; \ + } \ + } else \ __ret = __wait_event_common(wq, condition, state, tout);\ __ret; \ })