From patchwork Tue Sep 11 15:33:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 1438691 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 73EA9DFAF3 for ; Tue, 11 Sep 2012 15:33:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756734Ab2IKPdf (ORCPT ); Tue, 11 Sep 2012 11:33:35 -0400 Received: from eu1sys200aog109.obsmtp.com ([207.126.144.127]:57564 "HELO eu1sys200aog109.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751642Ab2IKPdf (ORCPT ); Tue, 11 Sep 2012 11:33:35 -0400 Received: from MTLCAS02.mtl.com ([193.47.165.155]) (using TLSv1) by eu1sys200aob109.postini.com ([207.126.147.11]) with SMTP ID DSNKUE9ZzS5IPwpOreuB6zn9sHQvsQMCFyh5@postini.com; Tue, 11 Sep 2012 15:33:35 UTC Received: from [10.7.17.62] (10.0.13.1) by MTLCAS02.mtl.com (10.0.8.72) with Microsoft SMTP Server id 14.2.247.3; Tue, 11 Sep 2012 18:33:31 +0300 Message-ID: <504F59CB.8090909@mellanox.co.il> Date: Tue, 11 Sep 2012 18:33:31 +0300 From: Yevgeny Kliteynik Reply-To: User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: , Linux RDMA , Yevgeny Kliteynik Subject: [PATCH 8/8 v2] opensm/osm_port_info_rcv.c: use PF() hint on fatal conditions X-Originating-IP: [10.0.13.1] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Yevgeny Kliteynik --- opensm/osm_port_info_rcv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/opensm/osm_port_info_rcv.c b/opensm/osm_port_info_rcv.c index 442bc3f..2a6d037 100644 --- a/opensm/osm_port_info_rcv.c +++ b/opensm/osm_port_info_rcv.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2012 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * Copyright (c) 2009 HNR Consulting. All rights reserved. * @@ -69,7 +69,7 @@ static void pi_rcv_check_and_fix_lid(osm_log_t * log, ib_port_info_t * pi, osm_physp_t * p) { - if (cl_ntoh16(pi->base_lid) > IB_LID_UCAST_END_HO) { + if (PF(cl_ntoh16(pi->base_lid) > IB_LID_UCAST_END_HO)) { OSM_LOG(log, OSM_LOG_ERROR, "ERR 0F04: " "Got invalid base LID %u from the network. " "Corrected to %u\n", cl_ntoh16(pi->base_lid), @@ -545,7 +545,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data) CL_PLOCK_EXCL_ACQUIRE(sm->p_lock); p_port = osm_get_port_by_guid(sm->p_subn, port_guid); - if (!p_port) { + if (PF(!p_port)) { CL_PLOCK_RELEASE(sm->p_lock); OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0F06: " "No port object for port with GUID 0x%" PRIx64 @@ -559,7 +559,7 @@ void osm_pi_rcv_process(IN void *context, IN void *data) p_node = p_port->p_node; CL_ASSERT(p_node); - if (p_pi->local_port_num > p_node->node_info.num_ports) { + if (PF(p_pi->local_port_num > p_node->node_info.num_ports)) { CL_PLOCK_RELEASE(sm->p_lock); OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0F15: " "Received PortInfo for port GUID 0x%" PRIx64 " is "