From patchwork Wed Oct 24 13:42:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1638451 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 43D7DDF2AB for ; Wed, 24 Oct 2012 13:42:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756439Ab2JXNmR (ORCPT ); Wed, 24 Oct 2012 09:42:17 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:55408 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756212Ab2JXNmP (ORCPT ); Wed, 24 Oct 2012 09:42:15 -0400 Received: by mail-bk0-f46.google.com with SMTP id jk13so257190bkc.19 for ; Wed, 24 Oct 2012 06:42:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=iHg6T1Sg5UkIaqi17WW/gjb6Sv7pyQD9ZZ8lVF0lyC4=; b=oBxk/5IEwZyRNv+ntGRHOULKEXBQn1RLV6UWwtTflq90LtLQeQVio2EdSDlKpYKFHb I+j83m5wVzAxWMNnQ0PVmi7oDJL1VnvL4TKSG019Ay1bAWGe1NkbrL19prCAyu781wts orP7Spmq3JvUEJjs3OSQZX6L+mklYYiK9SB9wC1B+90S5SlJKUY4Y68GvQG/DpyjmPvq XOsk6uyY8IOcH16v8xrK5+zpL4QSbhQjbX4voi3WxR/OG2Brs844z+MymsL4TYlGoNz3 PqIlD0M9I9lengP8f9ToOHxAQ1qg54Pf3JubimHyk7XgkvKaJ/vxC8TCJfZh72tmLlYZ nSAQ== Received: by 10.204.8.195 with SMTP id i3mr4748170bki.120.1351086134222; Wed, 24 Oct 2012 06:42:14 -0700 (PDT) Received: from [192.168.1.102] (c-71-192-10-85.hsd1.ma.comcast.net. [71.192.10.85]) by mx.google.com with ESMTPS id x13sm8252516bkv.16.2012.10.24.06.42.13 (version=SSLv3 cipher=OTHER); Wed, 24 Oct 2012 06:42:13 -0700 (PDT) Message-ID: <5087F033.6060604@dev.mellanox.co.il> Date: Wed, 24 Oct 2012 09:42:11 -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: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH] opensm/osm_trap_rcv.c: Eliminate unneeded trap_rcv_process_response routine X-Gm-Message-State: ALoCoQnPL7wH8WKaccvU7quiMPKRCf0OQgsKXR3eLQXlVYUA9iaC2b9s5reqD4ZlcT7XCzZmCpQl Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Trap represses (responses) never get to osm_trap_rcv_process. They are handled in osm_sm_mad_ctrl.c:sm_mad_ctrl_rcv_callback which invokes sm_mad_ctrl_process_trap_repress. Signed-off-by: Hal Rosenstock --- opensm/osm_trap_rcv.c | 24 +++--------------------- 1 files changed, 3 insertions(+), 21 deletions(-) diff --git a/opensm/osm_trap_rcv.c b/opensm/osm_trap_rcv.c index c0a287f..6d2a3a6 100644 --- a/opensm/osm_trap_rcv.c +++ b/opensm/osm_trap_rcv.c @@ -632,18 +632,6 @@ Exit: OSM_LOG_EXIT(sm->p_log); } -static void trap_rcv_process_response(IN osm_sm_t * sm, - IN const osm_madw_t * p_madw) -{ - - OSM_LOG_ENTER(sm->p_log); - - OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 3808: " - "This function is not supported yet\n"); - - OSM_LOG_EXIT(sm->p_log); -} - void osm_trap_rcv_process(IN void *context, IN void *data) { osm_sm_t *sm = context; @@ -656,15 +644,9 @@ void osm_trap_rcv_process(IN void *context, IN void *data) p_smp = osm_madw_get_smp_ptr(p_madw); - /* - Determine if this is a request for our own Trap - or if this is a response to our request for another - SM's Trap. - */ - if (ib_smp_is_response(p_smp)) - trap_rcv_process_response(sm, p_madw); - else - trap_rcv_process_request(sm, p_madw); + /* Only Trap requests get here */ + CL_ASSERT(!ib_smp_is_response(p_smp)); + trap_rcv_process_request(sm, p_madw); OSM_LOG_EXIT(sm->p_log); }