From patchwork Tue Dec 17 16:48:37 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: 3362881 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 364AA9F344 for ; Tue, 17 Dec 2013 16:58:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F408F2031C for ; Tue, 17 Dec 2013 16:58:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88E8920382 for ; Tue, 17 Dec 2013 16:58:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754938Ab3LQQ6f (ORCPT ); Tue, 17 Dec 2013 11:58:35 -0500 Received: from mtv-iport-3.cisco.com ([173.36.130.14]:30666 "EHLO mtv-iport-3.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754933Ab3LQQ6e (ORCPT ); Tue, 17 Dec 2013 11:58:34 -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=1387299515; x=1388509115; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=OzBBBmzBhmFJqqSXQRqBTUloRrZrw5+TvXseF6G+c54=; b=OMhqZyvWeV2oATNkQJoYZoK/1GuXTVRncD4kLnUJ2jXTs7AJxSy+letr 0jOjBEVjgl/bpkYu3dIrOyo2LKrowFqZ/CgDC5sdV66+oWA84oMlyD//P OyeE2CLxbAhqsV/5huir8ukTf2GEPw7LbcQXAWy23w53j8fkR7/g6EHiQ I=; X-IronPort-AV: E=Sophos;i="4.95,502,1384300800"; d="scan'208";a="98264212" Received: from mtv-core-4.cisco.com ([171.68.58.9]) by mtv-iport-3.cisco.com with ESMTP; 17 Dec 2013 16:49:04 +0000 Received: from sjc-savbu-bld03.cisco.com (sjc-savbu-bld03.cisco.com [171.71.188.58]) by mtv-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id rBHGn3cM021257; Tue, 17 Dec 2013 16:49:03 GMT Received: by sjc-savbu-bld03.cisco.com (Postfix, from userid 246720) id CAEEC3F80B; Tue, 17 Dec 2013 08:49:03 -0800 (PST) From: Upinder Malhi To: linux-rdma@vger.kernel.org Cc: Upinder Malhi Subject: [PATCH for-next 9/9] IB/usnic: Fix sparse should be static warnings Date: Tue, 17 Dec 2013 08:48:37 -0800 Message-Id: <1387298917-7365-10-git-send-email-umalhi@cisco.com> X-Mailer: git-send-email 1.8.0-rc0 In-Reply-To: <1387298917-7365-1-git-send-email-umalhi@cisco.com> References: <1387298917-7365-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 7200861..76bd097 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)) /\