From patchwork Mon Apr 8 11:37:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2408041 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 378F63FC71 for ; Mon, 8 Apr 2013 11:37:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935154Ab3DHLhF (ORCPT ); Mon, 8 Apr 2013 07:37:05 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:59880 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934522Ab3DHLhE (ORCPT ); Mon, 8 Apr 2013 07:37:04 -0400 Received: by mail-wi0-f176.google.com with SMTP id hm14so2434983wib.3 for ; Mon, 08 Apr 2013 04:37:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:content-type:content-transfer-encoding:x-gm-message-state; bh=neN+0E6kJ+z9L4gOPz2wtYzyQhluxOBYfOKYpEsOBjU=; b=MeooR7JdvEg00n6cDsmJq1OlOEk58c9H6S/fmL/EoGyl1PdtJfBO8BQ3AKPVvIu2qS 8+tXUK+BatR7TXUa1qrzflakjU3uYnwTJF6WwvI6ZOldalXc0TdWrOzulVZl8tjuEy7u 0lZI7sH2B00xj54gcEnahvXBYB3f+FSR9P0u9ym5MqYGRfVhRyWL2oa8jQms8UQ5aTGC 9ukC2NHXuFo/8EGV0pCrn68O1ZHRi3NkOdVOBa2LBod0tsisyctOjwqJ5BYfdcbeJMNF +H4/OlcGcoVJbhOwnMTha9dQi9Wa1NfY9AwWi2Lv8gy3qVwejZaOul1wqbyjnJnb5HtS v9xg== X-Received: by 10.194.133.232 with SMTP id pf8mr17998764wjb.31.1365421023017; Mon, 08 Apr 2013 04:37:03 -0700 (PDT) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPS id n2sm19115746wiy.6.2013.04.08.04.37.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 08 Apr 2013 04:37:02 -0700 (PDT) Message-ID: <5162ABDC.2080808@dev.mellanox.co.il> Date: Mon, 08 Apr 2013 07:37:00 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: "Chu, Al" , Shlomi Nimrodi Subject: [PATCH opensm] osm_congestion_control.c: Simplify some code X-Gm-Message-State: ALoCoQkHAiADLMb6ruFYkcUr+agRej0QYmLpth8kCWroPKxn/sv20YJtLoKOY0EFZnZd2yBkfvir Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org No need for p_osm->sm.p_subn->p_osm; just p_osm is sufficient Found-by: Shlomi Nimrodi Signed-off-by: Hal Rosenstock --- -- 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 --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;