rdma/core: Fix sparse warnings
authorSean Hefty <sean.hefty@intel.com>
Tue, 6 Dec 2011 21:13:10 +0000 (21:13 +0000)
committerRoland Dreier <roland@purestorage.com>
Wed, 4 Jan 2012 17:17:45 +0000 (09:17 -0800)
Clean up sparse warnings in the rdma core layer.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/ucm.c
drivers/infiniband/core/uverbs_cmd.c
include/rdma/ib_addr.h
include/rdma/ib_cm.h

index b8a0b4a7811b08dcbe71c07efedc8858a551b023..06f08713f487c8b3aec1f4bfe85f9dc744b1f2c7 100644 (file)
@@ -106,9 +106,6 @@ enum {
        IB_UCM_MAX_DEVICES = 32
 };
 
-/* ib_cm and ib_user_cm modules share /sys/class/infiniband_cm */
-extern struct class cm_class;
-
 #define IB_UCM_BASE_DEV MKDEV(IB_UCM_MAJOR, IB_UCM_BASE_MINOR)
 
 static void ib_ucm_add_one(struct ib_device *device);
index 254f1649c73438db02a916543e81d9ef1667f5e4..e26193f5f8541ead3001f83c91edac702a96dec9 100644 (file)
@@ -2446,9 +2446,9 @@ out_put:
        return ret ? ret : in_len;
 }
 
-int __uverbs_create_xsrq(struct ib_uverbs_file *file,
-                        struct ib_uverbs_create_xsrq *cmd,
-                        struct ib_udata *udata)
+static int __uverbs_create_xsrq(struct ib_uverbs_file *file,
+                               struct ib_uverbs_create_xsrq *cmd,
+                               struct ib_udata *udata)
 {
        struct ib_uverbs_create_srq_resp resp;
        struct ib_usrq_object           *obj;
index 639a4491fc0dd8fcf4e26931f2c6e8d1c7ed0566..99965395c5f3a5cebb645a67f76681985ce3da84 100644 (file)
@@ -281,7 +281,7 @@ static inline u16 rdma_get_vlan_id(union ib_gid *dgid)
 static inline struct net_device *rdma_vlan_dev_real_dev(const struct net_device *dev)
 {
        return dev->priv_flags & IFF_802_1Q_VLAN ?
-               vlan_dev_real_dev(dev) : 0;
+               vlan_dev_real_dev(dev) : NULL;
 }
 
 #endif /* IB_ADDR_H */
index c8f94e8db69c9fa1d6983a8bcefe148ff34e5fb8..83f77ac33957187b286d9bd73a0156d414d38066 100644 (file)
@@ -38,6 +38,9 @@
 #include <rdma/ib_mad.h>
 #include <rdma/ib_sa.h>
 
+/* ib_cm and ib_user_cm modules share /sys/class/infiniband_cm */
+extern struct class cm_class;
+
 enum ib_cm_state {
        IB_CM_IDLE,
        IB_CM_LISTEN,
This page took 0.030029 seconds and 5 git commands to generate.