[openib-general] [PATCH][CORE] fix sparse warnings about static variables
Tom Duffy
tduffy at sun.com
Tue Mar 1 10:12:35 PST 2005
This gets rid of the new sparse warnings like:
/build1/tduffy/openib-work/linux-2.6.10-openib/drivers/infiniband/core/mad.c:50:14: warning: symbol 'ib_mad_cache' was not declared. Should it be static?
Signed-off-by: Tom Duffy <tduffy at sun.com>
Index: drivers/infiniband/core/agent.c
===================================================================
--- drivers/infiniband/core/agent.c (revision 1922)
+++ drivers/infiniband/core/agent.c (working copy)
@@ -45,14 +45,11 @@
#include "smi.h"
#include "agent_priv.h"
#include "mad_priv.h"
-
+#include "agent.h"
spinlock_t ib_agent_port_list_lock;
static LIST_HEAD(ib_agent_port_list);
-extern kmem_cache_t *ib_mad_cache;
-
-
/*
* Caller must hold ib_agent_port_list_lock
*/
Index: drivers/infiniband/core/cache.c
===================================================================
--- drivers/infiniband/core/cache.c (revision 1922)
+++ drivers/infiniband/core/cache.c (working copy)
@@ -38,6 +38,7 @@
#include <linux/slab.h>
#include "core_priv.h"
+#include "ib_cache.h"
struct ib_pkey_cache {
int table_len;
Index: drivers/infiniband/core/mad_priv.h
===================================================================
--- drivers/infiniband/core/mad_priv.h (revision 1922)
+++ drivers/infiniband/core/mad_priv.h (working copy)
@@ -194,4 +194,6 @@ struct ib_mad_port_private {
struct ib_mad_qp_info qp_info[IB_MAD_QPS_CORE];
};
+extern kmem_cache_t *ib_mad_cache;
+
#endif /* __IB_MAD_PRIV_H__ */
Index: drivers/infiniband/core/smi.c
===================================================================
--- drivers/infiniband/core/smi.c (revision 1922)
+++ drivers/infiniband/core/smi.c (working copy)
@@ -37,7 +37,7 @@
*/
#include <ib_smi.h>
-
+#include "smi.h"
/*
* Fixup a directed route SMP for sending
More information about the general
mailing list