public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: sebastien dugue <sebastien.dugue-6ktuUTfB/bM@public.gmane.org>
To: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH] Fix 2.6.3[12] user_mad backports
Date: Mon, 1 Feb 2010 16:24:19 +0100	[thread overview]
Message-ID: <20100201162419.443afe03@frecb007965> (raw)


  The ib_umad_port's sm_sem semaphore is initialized as a mutex which
although it builds (with a warning) badly breaks at runtime.

  Fix this by using the proper initialization function sema_init().

  Also fix those DOSish end of lines.

Signed-off-by: Sebastien Dugue <sebastien.dugue-6ktuUTfB/bM@public.gmane.org>
---
 .../backport/2.6.31/user_mad_mutex_init.patch      |   30 ++++++++++----------
 .../backport/2.6.32/user_mad_mutex_init.patch      |   30 ++++++++++----------
 2 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch b/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch
index 09cb6e6..3054f1e 100644
--- a/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch
+++ b/kernel_patches/backport/2.6.31/user_mad_mutex_init.patch
@@ -1,15 +1,15 @@
-From: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
-Subject: use updated mutex_init.
-
-Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
---- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
-+++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
-@@ -1003,7 +1003,7 @@
- 
- 	port->ib_dev   = device;
- 	port->port_num = port_num;
--	init_MUTEX(&port->sm_sem);
-+	mutex_init(&port->sm_sem);
- 	mutex_init(&port->file_mutex);
- 	INIT_LIST_HEAD(&port->file_list);
- 
+From: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
+Subject: use updated mutex_init.
+
+Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
+--- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
++++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
+@@ -1003,7 +1003,7 @@
+ 
+ 	port->ib_dev   = device;
+ 	port->port_num = port_num;
+-	init_MUTEX(&port->sm_sem);
++	sema_init(&port->sm_sem, 1);
+ 	mutex_init(&port->file_mutex);
+ 	INIT_LIST_HEAD(&port->file_list);
+ 
diff --git a/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch b/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch
index 09cb6e6..3054f1e 100644
--- a/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch
+++ b/kernel_patches/backport/2.6.32/user_mad_mutex_init.patch
@@ -1,15 +1,15 @@
-From: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
-Subject: use updated mutex_init.
-
-Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
---- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
-+++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
-@@ -1003,7 +1003,7 @@
- 
- 	port->ib_dev   = device;
- 	port->port_num = port_num;
--	init_MUTEX(&port->sm_sem);
-+	mutex_init(&port->sm_sem);
- 	mutex_init(&port->file_mutex);
- 	INIT_LIST_HEAD(&port->file_list);
- 
+From: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
+Subject: use updated mutex_init.
+
+Signed-off-by: Sven-Thorsten Dietrich <sdietrich-l3A5Bk7waGM@public.gmane.org>
+--- a/drivers/infiniband/core/user_mad.c	2009-11-24 07:52:27.000000000 -0800
++++ b/drivers/infiniband/core//user_mad.c	2012-09-01 13:06:26.000000000 -0700
+@@ -1003,7 +1003,7 @@
+ 
+ 	port->ib_dev   = device;
+ 	port->port_num = port_num;
+-	init_MUTEX(&port->sm_sem);
++	sema_init(&port->sm_sem, 1);
+ 	mutex_init(&port->file_mutex);
+ 	INIT_LIST_HEAD(&port->file_list);
+ 
-- 
1.6.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2010-02-01 15:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100201162419.443afe03@frecb007965 \
    --to=sebastien.dugue-6ktuutfb/bm@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox