@@ -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();
@@ -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++)
@@ -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
};
@@ -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) {
@@ -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 */
@@ -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)) /\
Sparse spit out few functions should be static warnings. This patch provides a fix for the warnings. Signed-off-by: Upinder Malhi <umalhi@cisco.com> --- 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(-)