aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorManuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de>2011-06-15 22:09:57 -0400
committerDavid S. Miller <davem@conan.davemloft.net>2011-06-17 00:03:03 -0400
commitcb0a60564943db21ed3af975ac3d578cdc80b329 (patch)
tree207d01d3d6531dde9521abce061a4c48ad1d3690 /net/rds
parentd751e623969bf758f3f75f59418b19ede570ab50 (diff)
net/rds: use prink_ratelimited() instead of printk_ratelimit()
Since printk_ratelimit() shouldn't be used anymore (see comment in include/linux/printk.h), replace it with printk_ratelimited() Signed-off-by: Manuel Zerpies <manuel.f.zerpies@ww.stud.uni-erlangen.de> Signed-off-by: David S. Miller <davem@conan.davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/bind.c4
-rw-r--r--net/rds/ib_cm.c6
-rw-r--r--net/rds/ib_send.c4
-rw-r--r--net/rds/iw_cm.c9
-rw-r--r--net/rds/iw_rdma.c9
-rw-r--r--net/rds/iw_send.c4
-rw-r--r--net/rds/send.c7
7 files changed, 21 insertions, 22 deletions
diff --git a/net/rds/bind.c b/net/rds/bind.c
index 2f6b3fcc79f8..637bde56c9db 100644
--- a/net/rds/bind.c
+++ b/net/rds/bind.c
@@ -35,6 +35,7 @@
35#include <linux/in.h> 35#include <linux/in.h>
36#include <linux/if_arp.h> 36#include <linux/if_arp.h>
37#include <linux/jhash.h> 37#include <linux/jhash.h>
38#include <linux/ratelimit.h>
38#include "rds.h" 39#include "rds.h"
39 40
40#define BIND_HASH_SIZE 1024 41#define BIND_HASH_SIZE 1024
@@ -185,8 +186,7 @@ int rds_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
185 if (!trans) { 186 if (!trans) {
186 ret = -EADDRNOTAVAIL; 187 ret = -EADDRNOTAVAIL;
187 rds_remove_bound(rs); 188 rds_remove_bound(rs);
188 if (printk_ratelimit()) 189 printk_ratelimited(KERN_INFO "RDS: rds_bind() could not find a transport, "
189 printk(KERN_INFO "RDS: rds_bind() could not find a transport, "
190 "load rds_tcp or rds_rdma?\n"); 190 "load rds_tcp or rds_rdma?\n");
191 goto out; 191 goto out;
192 } 192 }
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index fd453dd5124b..cd67026be2d5 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_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 "ib.h" 40#include "ib.h"
@@ -435,13 +436,12 @@ static u32 rds_ib_protocol_compatible(struct rdma_cm_event *event)
435 version = RDS_PROTOCOL_3_0; 436 version = RDS_PROTOCOL_3_0;
436 while ((common >>= 1) != 0) 437 while ((common >>= 1) != 0)
437 version++; 438 version++;
438 } else if (printk_ratelimit()) { 439 }
439 printk(KERN_NOTICE "RDS: Connection from %pI4 using " 440 printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using "
440 "incompatible protocol version %u.%u\n", 441 "incompatible protocol version %u.%u\n",
441 &dp->dp_saddr, 442 &dp->dp_saddr,
442 dp->dp_protocol_major, 443 dp->dp_protocol_major,
443 dp->dp_protocol_minor); 444 dp->dp_protocol_minor);
444 }
445 return version; 445 return version;
446} 446}
447 447
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c
index 7c4dce8fa5e6..e59094981175 100644
--- a/net/rds/ib_send.c
+++ b/net/rds/ib_send.c
@@ -34,6 +34,7 @@
34#include <linux/in.h> 34#include <linux/in.h>
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/dmapool.h> 36#include <linux/dmapool.h>
37#include <linux/ratelimit.h>
37 38
38#include "rds.h" 39#include "rds.h"
39#include "ib.h" 40#include "ib.h"
@@ -207,8 +208,7 @@ static struct rds_message *rds_ib_send_unmap_op(struct rds_ib_connection *ic,
207 } 208 }
208 break; 209 break;
209 default: 210 default:
210 if (printk_ratelimit()) 211 printk_ratelimited(KERN_NOTICE
211 printk(KERN_NOTICE
212 "RDS/IB: %s: unexpected opcode 0x%x in WR!\n", 212 "RDS/IB: %s: unexpected opcode 0x%x in WR!\n",
213 __func__, send->s_wr.opcode); 213 __func__, send->s_wr.opcode);
214 break; 214 break;
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
diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
index 6deaa77495e3..8b77edbab272 100644
--- a/net/rds/iw_rdma.c
+++ b/net/rds/iw_rdma.c
@@ -32,6 +32,7 @@
32 */ 32 */
33#include <linux/kernel.h> 33#include <linux/kernel.h>
34#include <linux/slab.h> 34#include <linux/slab.h>
35#include <linux/ratelimit.h>
35 36
36#include "rds.h" 37#include "rds.h"
37#include "iw.h" 38#include "iw.h"
@@ -729,8 +730,8 @@ static int rds_iw_rdma_build_fastreg(struct rds_iw_mapping *mapping)
729 failed_wr = &f_wr; 730 failed_wr = &f_wr;
730 ret = ib_post_send(ibmr->cm_id->qp, &f_wr, &failed_wr); 731 ret = ib_post_send(ibmr->cm_id->qp, &f_wr, &failed_wr);
731 BUG_ON(failed_wr != &f_wr); 732 BUG_ON(failed_wr != &f_wr);
732 if (ret && printk_ratelimit()) 733 if (ret)
733 printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n", 734 printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
734 __func__, __LINE__, ret); 735 __func__, __LINE__, ret);
735 return ret; 736 return ret;
736} 737}
@@ -751,8 +752,8 @@ static int rds_iw_rdma_fastreg_inv(struct rds_iw_mr *ibmr)
751 752
752 failed_wr = &s_wr; 753 failed_wr = &s_wr;
753 ret = ib_post_send(ibmr->cm_id->qp, &s_wr, &failed_wr); 754 ret = ib_post_send(ibmr->cm_id->qp, &s_wr, &failed_wr);
754 if (ret && printk_ratelimit()) { 755 if (ret) {
755 printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n", 756 printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
756 __func__, __LINE__, ret); 757 __func__, __LINE__, ret);
757 goto out; 758 goto out;
758 } 759 }
diff --git a/net/rds/iw_send.c b/net/rds/iw_send.c
index 545d8ee3efb1..e40c3c5db2c4 100644
--- a/net/rds/iw_send.c
+++ b/net/rds/iw_send.c
@@ -34,6 +34,7 @@
34#include <linux/in.h> 34#include <linux/in.h>
35#include <linux/device.h> 35#include <linux/device.h>
36#include <linux/dmapool.h> 36#include <linux/dmapool.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 @@ void rds_iw_send_cq_comp_handler(struct ib_cq *cq, void *context)
258 * when the SEND completes. */ 259 * when the SEND completes. */
259 break; 260 break;
260 default: 261 default:
261 if (printk_ratelimit()) 262 printk_ratelimited(KERN_NOTICE
262 printk(KERN_NOTICE
263 "RDS/IW: %s: unexpected opcode 0x%x in WR!\n", 263 "RDS/IW: %s: unexpected opcode 0x%x in WR!\n",
264 __func__, send->s_wr.opcode); 264 __func__, send->s_wr.opcode);
265 break; 265 break;
diff --git a/net/rds/send.c b/net/rds/send.c
index d58ae5f9339e..aa57e22539ef 100644
--- a/net/rds/send.c
+++ b/net/rds/send.c
@@ -35,6 +35,7 @@
35#include <net/sock.h> 35#include <net/sock.h>
36#include <linux/in.h> 36#include <linux/in.h>
37#include <linux/list.h> 37#include <linux/list.h>
38#include <linux/ratelimit.h>
38 39
39#include "rds.h" 40#include "rds.h"
40 41
@@ -1006,16 +1007,14 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
1006 goto out; 1007 goto out;
1007 1008
1008 if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { 1009 if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) {
1009 if (printk_ratelimit()) 1010 printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
1010 printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n",
1011 &rm->rdma, conn->c_trans->xmit_rdma); 1011 &rm->rdma, conn->c_trans->xmit_rdma);
1012 ret = -EOPNOTSUPP; 1012 ret = -EOPNOTSUPP;
1013 goto out; 1013 goto out;
1014 } 1014 }
1015 1015
1016 if (rm->atomic.op_active && !conn->c_trans->xmit_atomic) { 1016 if (rm->atomic.op_active && !conn->c_trans->xmit_atomic) {
1017 if (printk_ratelimit()) 1017 printk_ratelimited(KERN_NOTICE "atomic_op %p conn xmit_atomic %p\n",
1018 printk(KERN_NOTICE "atomic_op %p conn xmit_atomic %p\n",
1019 &rm->atomic, conn->c_trans->xmit_atomic); 1018 &rm->atomic, conn->c_trans->xmit_atomic);
1020 ret = -EOPNOTSUPP; 1019 ret = -EOPNOTSUPP;
1021 goto out; 1020 goto out;