From patchwork Tue Aug 14 21:46:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 1323761 X-Patchwork-Delegate: alexne@voltaire.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 C401B3FC81 for ; Tue, 14 Aug 2012 21:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750998Ab2HNVqF (ORCPT ); Tue, 14 Aug 2012 17:46:05 -0400 Received: from eu1sys200aog101.obsmtp.com ([207.126.144.111]:39589 "HELO eu1sys200aog101.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751044Ab2HNVqF (ORCPT ); Tue, 14 Aug 2012 17:46:05 -0400 Received: from MTLCAS01.mtl.com ([193.47.165.155]) (using TLSv1) by eu1sys200aob101.postini.com ([207.126.147.11]) with SMTP ID DSNKUCrHGoERJB9p6uTSxl6Ix7F4tAplzgLz@postini.com; Tue, 14 Aug 2012 21:46:04 UTC Received: from [10.7.17.62] (10.0.13.1) by MTLCAS01.mtl.com (10.0.8.71) with Microsoft SMTP Server id 14.2.247.3; Wed, 15 Aug 2012 00:46:01 +0300 Message-ID: <502AC719.8010806@mellanox.co.il> Date: Wed, 15 Aug 2012 00:46:01 +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] opensm/osm_port_info_rcv.c: use if_PF() 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..829628f 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 "