aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/iw_cm.c
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-24 02:08:33 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-24 02:08:33 +0200
commitf0b9ad5690ed96f95d91ca19fba2fb2894bae6f0 (patch)
treed1b649e6f97ac0f1fc9864a296021c71cf69cd21 /net/rds/iw_cm.c
parent272e77de798362c31e6452a46a0e7d5b6aaeb550 (diff)
downloadkernel_samsung_smdk4412-f0b9ad5690ed96f95d91ca19fba2fb2894bae6f0.zip
kernel_samsung_smdk4412-f0b9ad5690ed96f95d91ca19fba2fb2894bae6f0.tar.gz
kernel_samsung_smdk4412-f0b9ad5690ed96f95d91ca19fba2fb2894bae6f0.tar.bz2
update network codemigrate_3.2
Diffstat (limited to 'net/rds/iw_cm.c')
-rw-r--r--net/rds/iw_cm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/rds/iw_cm.c b/net/rds/iw_cm.c
index c12db66..9556d28 100644
--- a/net/rds/iw_cm.c
+++ b/net/rds/iw_cm.c
@@ -34,6 +34,7 @@
#include <linux/in.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
+#include <linux/ratelimit.h>
#include "rds.h"
#include "iw.h"
@@ -258,8 +259,7 @@ static int rds_iw_setup_qp(struct rds_connection *conn)
*/
rds_iwdev = ib_get_client_data(dev, &rds_iw_client);
if (!rds_iwdev) {
- if (printk_ratelimit())
- printk(KERN_NOTICE "RDS/IW: No client_data for device %s\n",
+ printk_ratelimited(KERN_NOTICE "RDS/IW: No client_data for device %s\n",
dev->name);
return -EOPNOTSUPP;
}
@@ -365,13 +365,12 @@ static u32 rds_iw_protocol_compatible(const struct rds_iw_connect_private *dp)
version = RDS_PROTOCOL_3_0;
while ((common >>= 1) != 0)
version++;
- } else if (printk_ratelimit()) {
- printk(KERN_NOTICE "RDS: Connection from %pI4 using "
+ }
+ 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;
}