From patchwork Thu Oct 13 17:51:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9375613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 24DAF60865 for ; Thu, 13 Oct 2016 18:22:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19CAF2A167 for ; Thu, 13 Oct 2016 18:22:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D9882A181; Thu, 13 Oct 2016 18:22:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 634B12A167 for ; Thu, 13 Oct 2016 18:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933500AbcJMSWc (ORCPT ); Thu, 13 Oct 2016 14:22:32 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:55782 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933776AbcJMSW3 (ORCPT ); Thu, 13 Oct 2016 14:22:29 -0400 Received: from [83.175.99.196] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bukAY-0001yA-P9 for linux-rdma@vger.kernel.org; Thu, 13 Oct 2016 17:51:51 +0000 From: Christoph Hellwig To: linux-rdma@vger.kernel.org Subject: [PATCH 04/32] libibumad: mark symbols as static where possible Date: Thu, 13 Oct 2016 19:51:07 +0200 Message-Id: <1476381095-20041-5-git-send-email-hch@lst.de> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1476381095-20041-1-git-send-email-hch@lst.de> References: <1476381095-20041-1-git-send-email-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Christoph Hellwig Reviewed-by: Hal Rosenstock --- libibumad/tests/umad_reg2_compat.c | 10 +++++----- libibumad/tests/umad_register2.c | 12 ++++++------ libibumad/umad.c | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libibumad/tests/umad_reg2_compat.c b/libibumad/tests/umad_reg2_compat.c index 264882c..9224372 100644 --- a/libibumad/tests/umad_reg2_compat.c +++ b/libibumad/tests/umad_reg2_compat.c @@ -42,7 +42,7 @@ #define UNLIKELY_MGMT_CLASS 0x2F #define UNLIKELY_RMPP_MGMT_CLASS 0x4F -int test_failures = 0; +static int test_failures = 0; /** ========================================================================= * Stolen from OpenSM's register @@ -69,7 +69,7 @@ static void set_bit64(int b, uint64_t *buf) *addr |= mask; } -void dump_reg_attr(struct umad_reg_attr *reg_attr) +static void dump_reg_attr(struct umad_reg_attr *reg_attr) { printf("\nmgmt_class %u\n" "mgmt_class_version %u\n" @@ -85,7 +85,7 @@ void dump_reg_attr(struct umad_reg_attr *reg_attr) reg_attr->rmpp_version); } -int open_test_device(void) +static int open_test_device(void) { int fd = umad_open_port(NULL, 0); if (fd < 0) { @@ -96,7 +96,7 @@ int open_test_device(void) return fd; } -void test_register(void) +static void test_register(void) { int agent_id; long method_mask[16 / sizeof(long)]; @@ -147,7 +147,7 @@ void test_register(void) } -void test_fall_back(void) +static void test_fall_back(void) { int rc = 0; struct umad_reg_attr reg_attr; diff --git a/libibumad/tests/umad_register2.c b/libibumad/tests/umad_register2.c index 7a9b655..477bd29 100644 --- a/libibumad/tests/umad_register2.c +++ b/libibumad/tests/umad_register2.c @@ -57,9 +57,9 @@ struct ib_user_mad_reg_req2 { uint8_t reserved[3]; }; -int test_failures = 0; +static int test_failures = 0; -void dump_reg_attr(struct umad_reg_attr *reg_attr) +static void dump_reg_attr(struct umad_reg_attr *reg_attr) { printf("\nmgmt_class %u\n" "mgmt_class_version %u\n" @@ -75,7 +75,7 @@ void dump_reg_attr(struct umad_reg_attr *reg_attr) reg_attr->rmpp_version); } -int open_test_device(void) +static int open_test_device(void) { int fd = umad_open_port(NULL, 0); if (fd < 0) { @@ -86,7 +86,7 @@ int open_test_device(void) return fd; } -void test_fail(void) +static void test_fail(void) { int rc = 0; struct umad_reg_attr reg_attr; @@ -194,7 +194,7 @@ out: printf("\n *****\nEnd invalid tests\n"); } -void test_oui(void) +static void test_oui(void) { int rc = 0; struct umad_reg_attr reg_attr; @@ -251,7 +251,7 @@ out: printf("\n End valid oui tests\n *****\n"); } -void check_register2_support(void) +static void check_register2_support(void) { struct ib_user_mad_reg_req2 req; int fd; diff --git a/libibumad/umad.c b/libibumad/umad.c index c1b7338..1ac2948 100644 --- a/libibumad/umad.c +++ b/libibumad/umad.c @@ -83,7 +83,7 @@ struct ib_user_mad_reg_req2 { #define TRACE if (umaddebug) IBWARN #define DEBUG if (umaddebug) IBWARN -int umaddebug = 0; +static int umaddebug = 0; #define UMAD_DEV_FILE_SZ 256