From patchwork Tue Apr 19 14:27:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 718281 X-Patchwork-Delegate: alexne@voltaire.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3JERjl9029363 for ; Tue, 19 Apr 2011 14:27:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752453Ab1DSO1o (ORCPT ); Tue, 19 Apr 2011 10:27:44 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:33474 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752349Ab1DSO1o (ORCPT ); Tue, 19 Apr 2011 10:27:44 -0400 Received: by wya21 with SMTP id 21so4856480wya.19 for ; Tue, 19 Apr 2011 07:27:42 -0700 (PDT) Received: by 10.227.61.16 with SMTP id r16mr6329762wbh.24.1303223262880; Tue, 19 Apr 2011 07:27:42 -0700 (PDT) Received: from [192.168.1.100] (c-71-192-10-85.hsd1.ma.comcast.net [71.192.10.85]) by mx.google.com with ESMTPS id z13sm3497496wbd.12.2011.04.19.07.27.40 (version=SSLv3 cipher=OTHER); Tue, 19 Apr 2011 07:27:42 -0700 (PDT) Message-ID: <4DAD9BDB.9010608@dev.mellanox.co.il> Date: Tue, 19 Apr 2011 10:27:39 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma@vger.kernel.org" Subject: [PATCH 1/2] opensm/osm_sa_service_record.c: Remove useless if Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 19 Apr 2011 14:27:45 +0000 (UTC) in sr_rcv_process_delete_method Also, cosmetic formatting change Signed-off-by: Hal Rosenstock --- opensm/osm_sa_service_record.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/opensm/osm_sa_service_record.c b/opensm/osm_sa_service_record.c index 33c1f3b..72bcbdc 100644 --- a/opensm/osm_sa_service_record.c +++ b/opensm/osm_sa_service_record.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2006 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -634,10 +634,9 @@ static void sr_rcv_process_delete_method(osm_sa_t * sa, IN osm_madw_t * p_madw) "No records matched the RID\n"); osm_sa_send_error(sa, p_madw, IB_SA_MAD_STATUS_NO_RECORDS); goto Exit; - } else { - osm_svcr_remove_from_db(sa->p_subn, sa->p_log, p_svcr); } + osm_svcr_remove_from_db(sa->p_subn, sa->p_log, p_svcr); cl_plock_release(sa->p_lock); p_sr_item = malloc(sizeof(*p_sr_item)); @@ -654,8 +653,7 @@ static void sr_rcv_process_delete_method(osm_sa_t * sa, IN osm_madw_t * p_madw) cl_qlist_insert_tail(&sr_list, &p_sr_item->list_item); - if (p_svcr) - osm_svcr_delete(p_svcr); + osm_svcr_delete(p_svcr); sr_rcv_respond(sa, p_madw, &sr_list);