From patchwork Mon Dec 22 23:32:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 5529281 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CBA009F30B for ; Mon, 22 Dec 2014 23:32:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFFF720165 for ; Mon, 22 Dec 2014 23:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EA58C2017A for ; Mon, 22 Dec 2014 23:32:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753481AbaLVXcS (ORCPT ); Mon, 22 Dec 2014 18:32:18 -0500 Received: from prdiron-2.llnl.gov ([128.15.143.172]:29296 "EHLO prdiron-2.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753441AbaLVXcP (ORCPT ); Mon, 22 Dec 2014 18:32:15 -0500 X-Attachments: Received: from auk59.llnl.gov (HELO [134.9.93.24]) ([134.9.93.24]) by prdiron-2.llnl.gov with ESMTP; 22 Dec 2014 15:32:15 -0800 Subject: [PATCH 2/3] osm_congestion_control.c: Consistently set cc_unavailable_flag From: Albert Chu To: linux-rdma@vger.kernel.org Date: Mon, 22 Dec 2014 15:32:14 -0800 Message-Id: <1419291134.21271.15.camel@auk59.llnl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For consistency to other code, set flag using TRUE and FALSE macros. Signed-off-by: Albert L. Chu --- opensm/osm_congestion_control.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opensm/osm_congestion_control.c b/opensm/osm_congestion_control.c index 0612ba1..54574b7 100644 --- a/opensm/osm_congestion_control.c +++ b/opensm/osm_congestion_control.c @@ -482,12 +482,12 @@ static void cc_rcv_mad(void *context, void *data) if (p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_CLASS_VER || p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_METHOD || p_cc_mad->header.status & IB_MAD_STATUS_UNSUP_METHOD_ATTR) - p_port->cc_unavailable_flag = 1; + p_port->cc_unavailable_flag = TRUE; cl_plock_release(&p_osm->lock); goto Exit; } else - p_port->cc_unavailable_flag = 0; + p_port->cc_unavailable_flag = FALSE; if (p_cc_mad->header.attr_id == IB_MAD_ATTR_SW_CONG_SETTING) { ib_sw_cong_setting_t *p_sw_cong_setting; @@ -706,7 +706,7 @@ static void cc_mad_send_err_callback(void *bind_context, p_port->cc_timeout_count++; if (p_port->cc_timeout_count > OSM_CC_TIMEOUT_COUNT_THRESHOLD && !p_port->cc_unavailable_flag) - p_port->cc_unavailable_flag++; + p_port->cc_unavailable_flag = TRUE; } else p_cc->subn->subnet_initialization_error = TRUE;