From 8f1017612b6123873f7cd145df6c358823f87fee Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 1 May 2012 06:46:28 +0000 Subject: [PATCH] ib_srpt: Rewrite the gcc <= 4.6 compiler bug workaround such that it doesn't trigger a checkpatch complaint git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4258 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index ee0f4c1eb..e030f3a40 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -2003,9 +2003,11 @@ static int srpt_compl_thread(void *arg) BUG_ON(!ch); set_current_state(TASK_INTERRUPTIBLE); -#if defined(__GNUC__) && ((__GNUC__ -0) * 100 + __GNUC_MINOR__ -0) <= 406 +#if defined(__GNUC__) +#if (__GNUC__ * 100 + __GNUC_MINOR__) <= 406 /* See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52925. */ barrier(); +#endif #endif while (ch->state < CH_LIVE) { srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD, @@ -2019,9 +2021,11 @@ static int srpt_compl_thread(void *arg) ch->rtu_received = true; set_current_state(TASK_INTERRUPTIBLE); -#if defined(__GNUC__) && ((__GNUC__ -0) * 100 + __GNUC_MINOR__ -0) <= 406 +#if defined(__GNUC__) +#if (__GNUC__ * 100 + __GNUC_MINOR__) <= 406 /* See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52925. */ barrier(); +#endif #endif while (!ch->last_wqe_received) { srpt_process_completion(ch->cq, ch, SCST_CONTEXT_THREAD,