All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH] opensm/osm_trap_rcv.c: Eliminate unneeded trap_rcv_process_response routine
Date: Wed, 24 Oct 2012 09:42:11 -0400	[thread overview]
Message-ID: <5087F033.6060604@dev.mellanox.co.il> (raw)


Trap represses (responses) never get to osm_trap_rcv_process.
They are handled in osm_sm_mad_ctrl.c:sm_mad_ctrl_rcv_callback
which invokes sm_mad_ctrl_process_trap_repress.

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 opensm/osm_trap_rcv.c |   24 +++---------------------
 1 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/opensm/osm_trap_rcv.c b/opensm/osm_trap_rcv.c
index c0a287f..6d2a3a6 100644
--- a/opensm/osm_trap_rcv.c
+++ b/opensm/osm_trap_rcv.c
@@ -632,18 +632,6 @@ Exit:
 	OSM_LOG_EXIT(sm->p_log);
 }
 
-static void trap_rcv_process_response(IN osm_sm_t * sm,
-				      IN const osm_madw_t * p_madw)
-{
-
-	OSM_LOG_ENTER(sm->p_log);
-
-	OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3808: "
-		"This function is not supported yet\n");
-
-	OSM_LOG_EXIT(sm->p_log);
-}
-
 void osm_trap_rcv_process(IN void *context, IN void *data)
 {
 	osm_sm_t *sm = context;
@@ -656,15 +644,9 @@ void osm_trap_rcv_process(IN void *context, IN void *data)
 
 	p_smp = osm_madw_get_smp_ptr(p_madw);
 
-	/*
-	   Determine if this is a request for our own Trap
-	   or if this is a response to our request for another
-	   SM's Trap.
-	 */
-	if (ib_smp_is_response(p_smp))
-		trap_rcv_process_response(sm, p_madw);
-	else
-		trap_rcv_process_request(sm, p_madw);
+	/* Only Trap requests get here */
+	CL_ASSERT(!ib_smp_is_response(p_smp));
+	trap_rcv_process_request(sm, p_madw);
 
 	OSM_LOG_EXIT(sm->p_log);
 }
-- 
1.7.8.2

--
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:[~2012-10-24 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-24 13:42 Hal Rosenstock [this message]
     [not found] ` <5087F033.6060604-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-10-25 15:31   ` [PATCH] opensm/osm_trap_rcv.c: Eliminate unneeded trap_rcv_process_response routine Alex Netes

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=5087F033.6060604@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=alexne-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.