diff mbox

[for-next] IB/IPoIB: correct typo errors

Message ID 1343641441-11942-1-git-send-email-shlomop@mellanox.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Shlomo Pongratz July 30, 2012, 9:44 a.m. UTC
used 'ntbl->lock' instead of 'ntbl->rwlock'.
wrong pointer type in non CM stub 'ipoib_cm_enabled' in function prototype.

Reported-by: Fengguang Wu <wfg@linux.intel.com>

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
---
 drivers/infiniband/ulp/ipoib/ipoib.h      |    2 +-
 drivers/infiniband/ulp/ipoib/ipoib_main.c |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Roland Dreier July 30, 2012, 2:48 p.m. UTC | #1
thanks, rolled these fixes into the main patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Roland Dreier July 30, 2012, 2:50 p.m. UTC | #2
On Mon, Jul 30, 2012 at 2:44 AM, Shlomo Pongratz <shlomop@mellanox.com> wrote:
> -                               lockdep_is_held(&ntbl->lock))) != NULL) {
> +                               is_held(&ntbl->rwlock))) != NULL) {

By the way, I assume this is a typo -- there is no plain "is_held()," is there?

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shlomo Pongratz July 30, 2012, 2:58 p.m. UTC | #3
On 7/30/2012 5:50 PM, Roland Dreier wrote:
> On Mon, Jul 30, 2012 at 2:44 AM, Shlomo Pongratz <shlomop@mellanox.com> wrote:
>> -                               lockdep_is_held(&ntbl->lock))) != NULL) {
>> +                               is_held(&ntbl->rwlock))) != NULL) {
> By the way, I assume this is a typo -- there is no plain "is_held()," is there?
>
>   - R.
>
You are absolutely right.
Sorry.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index 4965f90..ca43901 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -591,7 +591,7 @@  static inline int ipoib_cm_admin_enabled(struct net_device *dev)
 {
 	return 0;
 }
-static inline int ipoib_cm_enabled(struct net_device *dev, struct neighbour *n)
+static inline int ipoib_cm_enabled(struct net_device *dev, u8 *hwaddr)
 
 {
 	return 0;
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index a68ce4e..61318a7 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -882,7 +882,7 @@  static void __ipoib_reap_neigh(struct ipoib_dev_priv *priv)
 		struct ipoib_neigh __rcu **np = &htbl->buckets[i];
 
 		while ((neigh = rcu_dereference_protected(*np,
-				lockdep_is_held(&ntbl->lock))) != NULL) {
+				is_held(&ntbl->rwlock))) != NULL) {
 			/* was the neigh idle for two GC periods */
 			if (time_after(neigh_obsolete, neigh->alive)) {
 				rcu_assign_pointer(*np,
@@ -962,7 +962,7 @@  struct ipoib_neigh *ipoib_neigh_alloc(u8 *daddr,
 					    lockdep_is_held(&ntbl->rwlock));
 	     neigh != NULL;
 	     neigh = rcu_dereference_protected(neigh->hnext,
-					lockdep_is_held(&ntbl->lock))) {
+					lockdep_is_held(&ntbl->rwlock))) {
 		if (memcmp(daddr, neigh->daddr, INFINIBAND_ALEN) == 0) {
 			/* found, take one ref on behalf of the caller */
 			if (!atomic_inc_not_zero(&neigh->refcnt)) {
@@ -1051,7 +1051,7 @@  void ipoib_neigh_free(struct ipoib_neigh *neigh)
 					    lockdep_is_held(&ntbl->rwlock));
 	     n != NULL;
 	     n = rcu_dereference_protected(neigh->hnext,
-					lockdep_is_held(&ntbl->lock))) {
+					lockdep_is_held(&ntbl->rwlock))) {
 		if (n == neigh) {
 			/* found */
 			rcu_assign_pointer(*np,
@@ -1135,7 +1135,7 @@  void ipoib_del_neighs_by_gid(struct net_device *dev, u8 *gid)
 		struct ipoib_neigh __rcu **np = &htbl->buckets[i];
 
 		while ((neigh = rcu_dereference_protected(*np,
-				lockdep_is_held(&ntbl->lock))) != NULL) {
+				lockdep_is_held(&ntbl->rwlock))) != NULL) {
 			/* delete neighs belong to this parent */
 			if (!memcmp(gid, neigh->daddr + 4, sizeof (union ib_gid))) {
 				rcu_assign_pointer(*np,
@@ -1175,7 +1175,7 @@  static void ipoib_flush_neighs(struct ipoib_dev_priv *priv)
 		struct ipoib_neigh __rcu **np = &htbl->buckets[i];
 
 		while ((neigh = rcu_dereference_protected(*np,
-				lockdep_is_held(&ntbl->lock))) != NULL) {
+				lockdep_is_held(&ntbl->rwlock))) != NULL) {
 			rcu_assign_pointer(*np,
 				   rcu_dereference_protected(neigh->hnext,
 					lockdep_is_held(&ntbl->rwlock)));