From patchwork Fri Dec 20 20:26:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Upinder Malhi (umalhi)" X-Patchwork-Id: 3391771 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6A6CAC0D4A for ; Fri, 20 Dec 2013 20:27:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5027120704 for ; Fri, 20 Dec 2013 20:27:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 525AF20666 for ; Fri, 20 Dec 2013 20:27:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874Ab3LTU1R (ORCPT ); Fri, 20 Dec 2013 15:27:17 -0500 Received: from mtv-iport-4.cisco.com ([173.36.130.15]:27390 "EHLO mtv-iport-4.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753207Ab3LTU1L (ORCPT ); Fri, 20 Dec 2013 15:27:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=4496; q=dns/txt; s=iport; t=1387571231; x=1388780831; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=1xRer2x8r6aGGH4Ny9LuyaSAlzYMKFn3tEyPAc7syiA=; b=W0pTYTr4JfACVlDUqnNQ2pOEh/ZFR28tn0Wr1twSgyg7iQPydg1BPxZs 0PvECgqrzsySqrub3T/z3fji5woAc/eiPLXOsPXEhyzia0rXjwkCRLEK6 YMbHYjTUkg/+8/F6y3GS4VnMIoarPherHhqKrWsLXZL/w427NLtG8SuH+ 4=; X-IronPort-AV: E=Sophos;i="4.95,523,1384300800"; d="scan'208";a="101057160" Received: from mtv-core-2.cisco.com ([171.68.58.7]) by mtv-iport-4.cisco.com with ESMTP; 20 Dec 2013 20:27:10 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id rBKKR9u3028546; Fri, 20 Dec 2013 20:27:10 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id DAE2F3F7E4; Fri, 20 Dec 2013 12:27:09 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org, roland@kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 09/15] IB/usnic: Fix sparse should be static warnings Date: Fri, 20 Dec 2013 12:26:40 -0800 Message-Id: <1387571206-8043-10-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387571206-8043-1-git-send-email-umalhi@cisco.com> References: <1387571206-8043-1-git-send-email-umalhi@cisco.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 Sparse spit out few functions should be static warnings. This patch provides a fix for the warnings. Signed-off-by: Upinder Malhi --- drivers/infiniband/hw/usnic/usnic_ib_main.c | 4 +++- drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c | 4 ++-- drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 2 +- drivers/infiniband/hw/usnic/usnic_transport.c | 4 ++-- drivers/infiniband/hw/usnic/usnic_transport.h | 1 + drivers/infiniband/hw/usnic/usnic_uiom.c | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/hw/usnic/usnic_ib_main.c b/drivers/infiniband/hw/usnic/usnic_ib_main.c index bf9c2d7..1cf22d5 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_main.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_main.c @@ -423,7 +423,8 @@ static DEFINE_PCI_DEVICE_TABLE(usnic_ib_pci_ids) = { {0,} }; -int usnic_ib_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) +static int usnic_ib_pci_probe(struct pci_dev *pdev, + const struct pci_device_id *id) { int err; struct usnic_ib_dev *pf; @@ -579,6 +580,7 @@ static void __exit usnic_ib_destroy(void) { usnic_dbg("\n"); usnic_debugfs_exit(); + usnic_transport_fini(); unregister_netdevice_notifier(&usnic_ib_netdevice_notifier); pci_unregister_driver(&usnic_ib_pci_driver); usnic_uiom_fini(); diff --git a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c index b5fb4d4..788f47a 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_qp_grp.c @@ -331,7 +331,7 @@ int usnic_ib_qp_grp_modify(struct usnic_ib_qp_grp *qp_grp, return status; } -struct usnic_vnic_res_chunk** +static struct usnic_vnic_res_chunk** alloc_res_chunk_list(struct usnic_vnic *vnic, struct usnic_vnic_res_spec *res_spec, void *owner_obj) { @@ -377,7 +377,7 @@ out_free_res: return ERR_PTR(err); } -void free_qp_grp_res(struct usnic_vnic_res_chunk **res_chunk_list) +static void free_qp_grp_res(struct usnic_vnic_res_chunk **res_chunk_list) { int i; for (i = 0; res_chunk_list[i]; i++) diff --git a/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c b/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c index e7925e4..bad985e 100644 --- a/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c +++ b/drivers/infiniband/hw/usnic/usnic_ib_sysfs.c @@ -282,7 +282,7 @@ static struct attribute *usnic_ib_qpn_default_attrs[] = { NULL }; -struct kobj_type usnic_ib_qpn_type = { +static struct kobj_type usnic_ib_qpn_type = { .sysfs_ops = &usnic_ib_qpn_sysfs_ops, .default_attrs = usnic_ib_qpn_default_attrs }; diff --git a/drivers/infiniband/hw/usnic/usnic_transport.c b/drivers/infiniband/hw/usnic/usnic_transport.c index 6f3d245..723bd6c 100644 --- a/drivers/infiniband/hw/usnic/usnic_transport.c +++ b/drivers/infiniband/hw/usnic/usnic_transport.c @@ -26,7 +26,7 @@ static unsigned long *roce_bitmap; static u16 roce_next_port = 1; #define ROCE_BITMAP_SZ ((1 << (8 /*CHAR_BIT*/ * sizeof(u16)))/8 /*CHAR BIT*/) -DEFINE_SPINLOCK(roce_bitmap_lock); +static DEFINE_SPINLOCK(roce_bitmap_lock); static const char *transport_to_str(enum usnic_transport_type type) { @@ -106,7 +106,7 @@ out_roce_custom: } } -int usnic_transport_init() +int usnic_transport_init(void) { roce_bitmap = kzalloc(ROCE_BITMAP_SZ, GFP_KERNEL); if (!roce_bitmap) { diff --git a/drivers/infiniband/hw/usnic/usnic_transport.h b/drivers/infiniband/hw/usnic/usnic_transport.h index e4c924e..091fdaf 100644 --- a/drivers/infiniband/hw/usnic/usnic_transport.h +++ b/drivers/infiniband/hw/usnic/usnic_transport.h @@ -24,4 +24,5 @@ u16 usnic_transport_rsrv_port(enum usnic_transport_type type, u16 port_num); void usnic_transport_unrsrv_port(enum usnic_transport_type type, u16 port_num); int usnic_transport_init(void); +void usnic_transport_fini(void); #endif /* !USNIC_TRANSPORT_H */ diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c index 0477d70..200941f 100644 --- a/drivers/infiniband/hw/usnic/usnic_uiom.c +++ b/drivers/infiniband/hw/usnic/usnic_uiom.c @@ -46,7 +46,7 @@ #include "usnic_uiom.h" #include "usnic_uiom_interval_tree.h" -struct workqueue_struct *usnic_uiom_wq; +static struct workqueue_struct *usnic_uiom_wq; #define USNIC_UIOM_PAGE_CHUNK \ ((PAGE_SIZE - offsetof(struct usnic_uiom_chunk, page_list)) /\