IB/rds: suppress incompatible protocol when version is known
authorMarciniszyn, Mike <mike.marciniszyn@intel.com>
Fri, 21 Dec 2012 08:01:54 +0000 (08:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Dec 2012 23:17:37 +0000 (15:17 -0800)
Add an else to only print the incompatible protocol message
when version hasn't been established.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib_cm.c

index a1e116277477541606e51e0c4af31aa53af4b673..31b74f5e61adbd37535b636b1499c384bdd992f5 100644 (file)
@@ -434,12 +434,11 @@ static u32 rds_ib_protocol_compatible(struct rdma_cm_event *event)
                version = RDS_PROTOCOL_3_0;
                while ((common >>= 1) != 0)
                        version++;
-       }
-       printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using "
-                       "incompatible protocol version %u.%u\n",
-                       &dp->dp_saddr,
-                       dp->dp_protocol_major,
-                       dp->dp_protocol_minor);
+       } else
+               printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using incompatible protocol version %u.%u\n",
+                               &dp->dp_saddr,
+                               dp->dp_protocol_major,
+                               dp->dp_protocol_minor);
        return version;
 }