Ib/usnic: Explicitly include usnic headers
authorLeon Romanovsky <leon@kernel.org>
Sat, 22 Apr 2017 14:28:50 +0000 (17:28 +0300)
committerDoug Ledford <dledford@redhat.com>
Fri, 28 Apr 2017 17:11:43 +0000 (13:11 -0400)
Sparse tool complains about undeclared symbols in usnic_ib_verbs.c
and usnic_ib_sysfs.c This is caused by lack of direct include of
appropriate usnic_ib_verbs.h and usnic_ib_sysfs.h, where all
these functions were declared.

Simple include eliminates 30 warnings similar to the below one:

drivers/infiniband/hw/usnic/usnic_ib_sysfs.c:304:6: warning: symbol
'usnic_ib_sysfs_unregister_usdev' was
not declared. Should it be static?

CC: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/usnic/usnic_ib_sysfs.c
drivers/infiniband/hw/usnic/usnic_ib_verbs.c

index 04443242e25877ccd65a569500574e89a64aa433..32956f9f57153f4e95909cc6c42ddf67f1323899 100644 (file)
@@ -44,6 +44,7 @@
 #include "usnic_vnic.h"
 #include "usnic_ib_verbs.h"
 #include "usnic_log.h"
+#include "usnic_ib_sysfs.h"
 
 static ssize_t usnic_ib_show_board(struct device *device,
                                        struct device_attribute *attr,
index 3284730d3c0923d33f3c2ea916c0f38f71c515ca..bcd6f7b1c634d78542c05a854b8a7828ba7538b8 100644 (file)
@@ -46,6 +46,7 @@
 #include "usnic_log.h"
 #include "usnic_uiom.h"
 #include "usnic_transport.h"
+#include "usnic_ib_verbs.h"
 
 #define USNIC_DEFAULT_TRANSPORT USNIC_TRANSPORT_ROCE_CUSTOM