public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Eli Dorfman (Voltaire)" <dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
Cc: Ira Weiny <weiny2-i2BcT+NCU+M@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] infiniband-diags: Do not exit when unexpected node found
Date: Sun, 05 Sep 2010 11:28:57 +0300	[thread overview]
Message-ID: <4C8354C9.5070502@gmail.com> (raw)


Show error message but do not exit when unexpected node is found.

Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
 infiniband-diags/libibnetdisc/src/chassis.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/infiniband-diags/libibnetdisc/src/chassis.c b/infiniband-diags/libibnetdisc/src/chassis.c
index 25d7473..7762d22 100644
--- a/infiniband-diags/libibnetdisc/src/chassis.c
+++ b/infiniband-diags/libibnetdisc/src/chassis.c
@@ -457,7 +457,6 @@ static int get_sfb_slot(ibnd_node_t * n, ibnd_port_t * lineport)
 	} else {
 		IBND_ERROR("Unexpected node found: guid 0x%016" PRIx64 "\n",
 			   n->guid);
-		return -1;
 	}
 	return 0;
 }
@@ -498,7 +497,6 @@ static int get_router_slot(ibnd_node_t * n, ibnd_port_t * spineport)
 	} else {
 		IBND_ERROR("Unexpected node found: guid 0x%016" PRIx64 "\n",
 			   spineport->node->guid);
-		return -1;
 	}
 	return 0;
 }
@@ -533,7 +531,6 @@ static int get_slb_slot(ibnd_node_t * n, ibnd_port_t * spineport)
 	} else {
 		IBND_ERROR("Unexpected node found: guid 0x%016" PRIx64 "\n",
 			   spineport->node->guid);
-		return -1;
 	}
 	return 0;
 }
@@ -588,8 +585,7 @@ static int fill_voltaire_chassis_record(ibnd_node_t * node)
 			}
 			if (!node->ch_type)
 				/* we assume here that remoteport belongs to line */
-				if (get_sfb_slot(node, port->remoteport))
-					return -1;
+				get_sfb_slot(node, port->remoteport);
 
 			/* we could break here, but need to find if more routers connected */
 		}
@@ -607,8 +603,7 @@ static int fill_voltaire_chassis_record(ibnd_node_t * node)
 				continue;
 
 			/* we assume here that remoteport belongs to spine */
-			if (get_slb_slot(node, port->remoteport))
-				return -1;
+			get_slb_slot(node, port->remoteport);
 			break;
 		}
 	}
-- 
1.5.5

--
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-09-05  8:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-05  8:28 Eli Dorfman (Voltaire) [this message]
     [not found] ` <4C8354C9.5070502-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-09-06 16:36   ` [PATCH] infiniband-diags: Do not exit when unexpected node found Sasha Khapyorsky

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=4C8354C9.5070502@gmail.com \
    --to=dorfman.eli-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org \
    --cc=weiny2-i2BcT+NCU+M@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