[PATCH ibdiags 05/14] ibdiags: Put the prototype for mlnx_ext_port_infor_err in a header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jason Gunthorpe <jgg@xxxxxxxxxxxx>

Prototypes should be where the implementation can see them to avoid
mistakes. Fixes the compiler warning:

ibnetdisc.c:228:5: warning: no previous prototype for ‘mlnx_ext_port_info_err’ [-Wmissing-prototypes]

Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
---
 libibnetdisc/src/internal.h  | 3 +++
 libibnetdisc/src/query_smp.c | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libibnetdisc/src/internal.h b/libibnetdisc/src/internal.h
index 997f439da07caa..c12b03af7946fd 100644
--- a/libibnetdisc/src/internal.h
+++ b/libibnetdisc/src/internal.h
@@ -114,4 +114,7 @@ void add_to_type_list(ibnd_node_t * node, f_internal_t * fabric);
 
 void destroy_node(ibnd_node_t * node);
 
+int mlnx_ext_port_info_err(smp_engine_t *engine, ibnd_smp_t *smp, uint8_t *mad,
+			   void *cb_data);
+
 #endif				/* _INTERNAL_H_ */
diff --git a/libibnetdisc/src/query_smp.c b/libibnetdisc/src/query_smp.c
index 8f179e4913fcaf..f6b632905084dc 100644
--- a/libibnetdisc/src/query_smp.c
+++ b/libibnetdisc/src/query_smp.c
@@ -41,9 +41,6 @@
 #include <infiniband/umad.h>
 #include "internal.h"
 
-extern int mlnx_ext_port_info_err(smp_engine_t * engine, ibnd_smp_t * smp,
-				  uint8_t * mad, void *cb_data);
-
 static void queue_smp(smp_engine_t * engine, ibnd_smp_t * smp)
 {
 	smp->qnext = NULL;
-- 
2.21.0




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux