From patchwork Thu Oct 13 17:51:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 9375619 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 8F85C60865 for ; Thu, 13 Oct 2016 18:22:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81FDB2A167 for ; Thu, 13 Oct 2016 18:22:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77BAC2A176; Thu, 13 Oct 2016 18:22:59 +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 18FFA2A16D for ; Thu, 13 Oct 2016 18:22:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934927AbcJMSWw (ORCPT ); Thu, 13 Oct 2016 14:22:52 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:55870 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934917AbcJMSWo (ORCPT ); Thu, 13 Oct 2016 14:22:44 -0400 Received: from [83.175.99.196] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1bukAs-00029n-Hb for linux-rdma@vger.kernel.org; Thu, 13 Oct 2016 17:52:10 +0000 From: Christoph Hellwig To: linux-rdma@vger.kernel.org Subject: [PATCH 11/32] iwpmd: mark symbols static where possible Date: Thu, 13 Oct 2016 19:51:14 +0200 Message-Id: <1476381095-20041-12-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: Steve Wise --- iwpmd/iwarp_pm_common.c | 6 +++--- iwpmd/iwarp_pm_server.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/iwpmd/iwarp_pm_common.c b/iwpmd/iwarp_pm_common.c index b20a368..ee9d119 100644 --- a/iwpmd/iwarp_pm_common.c +++ b/iwpmd/iwarp_pm_common.c @@ -39,9 +39,9 @@ #endif /* iwpm config params */ -char * iwpm_param_names[IWPM_PARAM_NUM] = +static char * iwpm_param_names[IWPM_PARAM_NUM] = { "nl_sock_rbuf_size" }; -int iwpm_param_vals[IWPM_PARAM_NUM] = +static int iwpm_param_vals[IWPM_PARAM_NUM] = { 0 }; /** @@ -276,7 +276,7 @@ void destroy_iwpm_socket(int pm_sock) /** * check_iwpm_nlattr - Check for NULL netlink attribute */ -int check_iwpm_nlattr(struct nlattr *nltb[], int nla_count) +static int check_iwpm_nlattr(struct nlattr *nltb[], int nla_count) { int i, ret = 0; for (i = 1; i < nla_count; i++) { diff --git a/iwpmd/iwarp_pm_server.c b/iwpmd/iwarp_pm_server.c index 89d3ee5..b8ae3e3 100644 --- a/iwpmd/iwarp_pm_server.c +++ b/iwpmd/iwarp_pm_server.c @@ -34,34 +34,34 @@ #include "config.h" #include "iwarp_pm.h" -const char iwpm_ulib_name [] = "iWarpPortMapperUser"; -int iwpm_version = 3; +static const char iwpm_ulib_name [] = "iWarpPortMapperUser"; +static int iwpm_version = 3; LIST_HEAD(mapping_reqs); /* list of map tracking objects */ LIST_HEAD(pending_messages); /* list of pending wire messages */ iwpm_client client_list[IWARP_PM_MAX_CLIENTS];/* list of iwarp port mapper clients */ -int mapinfo_num_list[IWARP_PM_MAX_CLIENTS]; /* list of iwarp port mapper clients */ +static int mapinfo_num_list[IWARP_PM_MAX_CLIENTS]; /* list of iwarp port mapper clients */ /* socket handles */ static int pmv4_sock, pmv6_sock, netlink_sock, pmv4_client_sock, pmv6_client_sock; -pthread_t map_req_thread; /* handling mapping requests timeout */ -pthread_cond_t cond_req_complete; +static pthread_t map_req_thread; /* handling mapping requests timeout */ +pthread_cond_t cond_req_complete; pthread_mutex_t map_req_mutex = PTHREAD_MUTEX_INITIALIZER; int wake = 0; /* set if map_req_thread is wake */ -pthread_t pending_msg_thread; /* sending iwpm wire messages */ +static pthread_t pending_msg_thread; /* sending iwpm wire messages */ pthread_cond_t cond_pending_msg; pthread_mutex_t pending_msg_mutex = PTHREAD_MUTEX_INITIALIZER; static void iwpm_cleanup(void); -int print_mappings = 0; +static int print_mappings = 0; /** * iwpm_signal_handler - Handle signals which iwarp port mapper receives * @signum: the number of the caught signal */ -void iwpm_signal_handler(int signum) +static void iwpm_signal_handler(int signum) { switch(signum) { case SIGHUP: @@ -87,7 +87,7 @@ void iwpm_signal_handler(int signum) /** * iwpm_mapping_reqs_handler - Handle mapping requests timeouts and retries */ -void *iwpm_mapping_reqs_handler(void) +static void *iwpm_mapping_reqs_handler(void) { iwpm_mapping_request *iwpm_map_req, *next_map_req; int ret = 0; @@ -139,7 +139,7 @@ mapping_reqs_handler_exit: /** * iwpm_pending_msgs_handler - Handle sending iwarp port mapper wire messages */ -void *iwpm_pending_msgs_handler(void) +static void *iwpm_pending_msgs_handler(void) { iwpm_pending_msg *pending_msg; iwpm_send_msg *send_msg;