public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: "Chu, Al" <chu11-i2BcT+NCU+M@public.gmane.org>,
	Shlomi Nimrodi <shlomin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH opensm] osm_congestion_control.c: Simplify some code
Date: Mon, 08 Apr 2013 07:37:00 -0400	[thread overview]
Message-ID: <5162ABDC.2080808@dev.mellanox.co.il> (raw)


No need for p_osm->sm.p_subn->p_osm; just p_osm is sufficient

Found-by: Shlomi Nimrodi <shlomin-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/opensm/osm_congestion_control.c b/opensm/osm_congestion_control.c
index 17af407..e27ba20 100644
--- a/opensm/osm_congestion_control.c
+++ b/opensm/osm_congestion_control.c
@@ -362,7 +362,7 @@ int osm_congestion_control_setup(struct osm_opensm *p_osm)
 	/*
 	 * Do nothing unless the most recent routing attempt was successful.
 	 */
-	if (!p_osm->sm.p_subn->p_osm->routing_engine_used)
+	if (!p_osm->routing_engine_used)
 		return 0;
 
 	cc_setup_mad_data(&p_osm->sm);
@@ -409,7 +409,7 @@ int osm_congestion_control_setup(struct osm_opensm *p_osm)
 
 int osm_congestion_control_wait_pending_transactions(struct osm_opensm *p_osm)
 {
-	osm_congestion_control_t *cc = &p_osm->sm.p_subn->p_osm->cc;
+	osm_congestion_control_t *cc = &p_osm->cc;
 
 	if (!p_osm->subn.opt.congestion_control)
 		return 0;
--
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:[~2013-04-08 11:37 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=5162ABDC.2080808@dev.mellanox.co.il \
    --to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
    --cc=chu11-i2BcT+NCU+M@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shlomin-VPRAkNaXOzVWk0Htik3J/w@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