diff options
Diffstat (limited to 'net/rds/iw_cm.c')
-rw-r--r-- | net/rds/iw_cm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c index c12db66f24c7..9556d2895f7a 100644 --- a/net/rds/iw_cm.c +++ b/net/rds/iw_cm.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/in.h> | 34 | #include <linux/in.h> |
35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
36 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
37 | #include <linux/ratelimit.h> | ||
37 | 38 | ||
38 | #include "rds.h" | 39 | #include "rds.h" |
39 | #include "iw.h" | 40 | #include "iw.h" |
@@ -258,8 +259,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn) | |||
258 | */ | 259 | */ |
259 | rds_iwdev = ib_get_client_data(dev, &rds_iw_client); | 260 | rds_iwdev = ib_get_client_data(dev, &rds_iw_client); |
260 | if (!rds_iwdev) { | 261 | if (!rds_iwdev) { |
261 | if (printk_ratelimit()) | 262 | printk_ratelimited(KERN_NOTICE "RDS/IW: No client_data for device %s\n", |
262 | printk(KERN_NOTICE "RDS/IW: No client_data for device %s\n", | ||
263 | dev->name); | 263 | dev->name); |
264 | return -EOPNOTSUPP; | 264 | return -EOPNOTSUPP; |
265 | } | 265 | } |
@@ -365,13 +365,12 @@ static u32 rds_iw_protocol_compatible(const struct rds_iw_connect_private *dp) | |||
365 | version = RDS_PROTOCOL_3_0; | 365 | version = RDS_PROTOCOL_3_0; |
366 | while ((common >>= 1) != 0) | 366 | while ((common >>= 1) != 0) |
367 | version++; | 367 | version++; |
368 | } else if (printk_ratelimit()) { | 368 | } |
369 | printk(KERN_NOTICE "RDS: Connection from %pI4 using " | 369 | printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using " |
370 | "incompatible protocol version %u.%u\n", | 370 | "incompatible protocol version %u.%u\n", |
371 | &dp->dp_saddr, | 371 | &dp->dp_saddr, |
372 | dp->dp_protocol_major, | 372 | dp->dp_protocol_major, |
373 | dp->dp_protocol_minor); | 373 | dp->dp_protocol_minor); |
374 | } | ||
375 | return version; | 374 | return version; |
376 | } | 375 | } |
377 | 376 | ||