[ewg] [PATCH] sdp: Fix compilation on i386 with gcc 3.4

Yossi Etigin yosefe at voltaire.com
Wed May 20 13:10:41 PDT 2009


 Fix compilation error on Red Hat 4, i386. This distribution has gcc 3.4,
which requires inline functions body to be defined before their usage. 
This is because gcc 3.4 on i386 has the unit-at-a-time feature disabled.

Signed-off-by: Yossi Etigin <yosefe at voltaire.com>

---

diff --git a/drivers/infiniband/ulp/sdp/sdp_main.c b/drivers/infiniband/ulp/sdp/sdp_main.c
index 51801e0..f238a0f 100644
--- a/drivers/infiniband/ulp/sdp/sdp_main.c
+++ b/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -143,8 +143,6 @@ static spinlock_t sock_list_lock;
 
 static DEFINE_RWLOCK(device_removal_lock);
 
-static inline void sdp_start_dreq_wait_timeout(struct sdp_sock *ssk, int timeo);
-
 static inline unsigned int sdp_keepalive_time_when(const struct sdp_sock *ssk)
 {
 	return ssk->keepalive_time ? : sdp_keepalive_time;
@@ -447,6 +445,14 @@ done:
 	sdp_dbg(sk, "%s done\n", __func__);
 }
 
+static inline void sdp_start_dreq_wait_timeout(struct sdp_sock *ssk, int timeo)
+{
+	sdp_dbg(&ssk->isk.sk, "Starting dreq wait timeout\n");
+
+	queue_delayed_work(sdp_workqueue, &ssk->dreq_wait_work, timeo);
+	ssk->dreq_wait_timeout = 1;
+}
+
 static void sdp_send_disconnect(struct sock *sk)
 {
 	sock_hold(sk, SOCK_REF_DREQ_TO);
@@ -840,14 +846,6 @@ static int sdp_ioctl(struct sock *sk, int cmd, unsigned long arg)
 	return put_user(answ, (int __user *)arg); 
 }
 
-static inline void sdp_start_dreq_wait_timeout(struct sdp_sock *ssk, int timeo)
-{
-	sdp_dbg(&ssk->isk.sk, "Starting dreq wait timeout\n");
-
-	queue_delayed_work(sdp_workqueue, &ssk->dreq_wait_work, timeo);
-	ssk->dreq_wait_timeout = 1;
-}
-
 void sdp_cancel_dreq_wait_timeout(struct sdp_sock *ssk)
 {
 	if (!ssk->dreq_wait_timeout)



More information about the ewg mailing list