From patchwork Fri Jul 12 13:31:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2826938 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 8A9189F7D6 for ; Fri, 12 Jul 2013 13:31:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 784A620157 for ; Fri, 12 Jul 2013 13:31:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C74D20151 for ; Fri, 12 Jul 2013 13:31:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964857Ab3GLNbJ (ORCPT ); Fri, 12 Jul 2013 09:31:09 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:60161 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964808Ab3GLNbG (ORCPT ); Fri, 12 Jul 2013 09:31:06 -0400 Received: by mail-we0-f179.google.com with SMTP id w59so8201022wes.10 for ; Fri, 12 Jul 2013 06:31:05 -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=mx4snWnbDnZEahctscSFD4yRIUPmZ+B7CdjdZJNQGT4=; b=Sh9LBsXJ7rZ5OuR8QPKRF/YGJuLC1sMbPuhRCiYaH5M3RlnbOdQxxYIXXdlKvJNvl0 vdMY2zwO4m5Xji5kQVanPiGUs3BQcicUsRWXW4jmtoFu8h84nK/g2V9WTFFTyUq2JWNe rzvqoTy1JOPO6eLplTjKKTbLErv8Uyd1Dz63nht+BWkMcy6M8RbKshh4cLm4FA8xescD WnT5AqZ1418ixJ9tbHfmkz11ZdloU6nv2v9C4qnF0FQavRJQVu9PdXKUjqgRc+wHu48Q w4yRaut1qsPT4VdWEiM09XEIRSIpj7P8p0Vt+6KY/XPNvWPET1a4Y9Mww3i0owR01AxV mliw== X-Received: by 10.181.12.80 with SMTP id eo16mr1688427wid.44.1373635864947; Fri, 12 Jul 2013 06:31:04 -0700 (PDT) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPSA id fd3sm3431845wic.10.2013.07.12.06.31.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Jul 2013 06:31:04 -0700 (PDT) Message-ID: <51E00515.4050009@dev.mellanox.co.il> Date: Fri, 12 Jul 2013 09:31:01 -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: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Alex Netes Subject: [PATCH 1/3 opensm] Fix test scenario in cl_event_wheel X-Gm-Message-State: ALoCoQkVMK8x7H1sv8vKFVDSsPyatGitr2f7G80taJZcmaJJ0BgW910ZUrJ2+JRhh7+zn97n/AlL Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Alex Netes The testing code is missing complib init/destroy functions and use incorrect callback function prototype. Signed-off-by: Alex Netes --- complib/cl_event_wheel.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/complib/cl_event_wheel.c b/complib/cl_event_wheel.c index d3caa03..21d1ed1 100644 --- a/complib/cl_event_wheel.c +++ b/complib/cl_event_wheel.c @@ -503,7 +503,7 @@ void __cl_event_wheel_dump(IN cl_event_wheel_t * const p_event_wheel) /* The callback for aging event */ /* We assume we pass a text context */ -void __test_event_aging(uint64_t key, void *context) +static uint64_t __test_event_aging(uint64_t key, uint32_t num_regs, void *context) { printf("*****************************************************\n"); printf("Aged key: 0x%" PRIx64 " Context:%s\n", key, (char *)context); @@ -514,6 +514,9 @@ int main() cl_event_wheel_t event_wheel; /* uint64_t key; */ + /* init complib */ + complib_init(); + /* construct */ cl_event_wheel_construct(&event_wheel); @@ -560,6 +563,8 @@ int main() /* destroy */ cl_event_wheel_destroy(&event_wheel); + complib_exit(); + return (0); }