Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Manuel Zerpies and committed by
David S. Miller
cb0a6056 d751e623

+21 -22
+2 -2
net/rds/bind.c
··· 35 35 #include <linux/in.h> 36 36 #include <linux/if_arp.h> 37 37 #include <linux/jhash.h> 38 + #include <linux/ratelimit.h> 38 39 #include "rds.h" 39 40 40 41 #define BIND_HASH_SIZE 1024 ··· 186 185 if (!trans) { 187 186 ret = -EADDRNOTAVAIL; 188 187 rds_remove_bound(rs); 189 - if (printk_ratelimit()) 190 - printk(KERN_INFO "RDS: rds_bind() could not find a transport, " 188 + printk_ratelimited(KERN_INFO "RDS: rds_bind() could not find a transport, " 191 189 "load rds_tcp or rds_rdma?\n"); 192 190 goto out; 193 191 }
+3 -3
net/rds/ib_cm.c
··· 34 34 #include <linux/in.h> 35 35 #include <linux/slab.h> 36 36 #include <linux/vmalloc.h> 37 + #include <linux/ratelimit.h> 37 38 38 39 #include "rds.h" 39 40 #include "ib.h" ··· 436 435 version = RDS_PROTOCOL_3_0; 437 436 while ((common >>= 1) != 0) 438 437 version++; 439 - } else if (printk_ratelimit()) { 440 - printk(KERN_NOTICE "RDS: Connection from %pI4 using " 438 + } 439 + printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using " 441 440 "incompatible protocol version %u.%u\n", 442 441 &dp->dp_saddr, 443 442 dp->dp_protocol_major, 444 443 dp->dp_protocol_minor); 445 - } 446 444 return version; 447 445 } 448 446
+2 -2
net/rds/ib_send.c
··· 34 34 #include <linux/in.h> 35 35 #include <linux/device.h> 36 36 #include <linux/dmapool.h> 37 + #include <linux/ratelimit.h> 37 38 38 39 #include "rds.h" 39 40 #include "ib.h" ··· 208 207 } 209 208 break; 210 209 default: 211 - if (printk_ratelimit()) 212 - printk(KERN_NOTICE 210 + printk_ratelimited(KERN_NOTICE 213 211 "RDS/IB: %s: unexpected opcode 0x%x in WR!\n", 214 212 __func__, send->s_wr.opcode); 215 213 break;
+4 -5
net/rds/iw_cm.c
··· 34 34 #include <linux/in.h> 35 35 #include <linux/slab.h> 36 36 #include <linux/vmalloc.h> 37 + #include <linux/ratelimit.h> 37 38 38 39 #include "rds.h" 39 40 #include "iw.h" ··· 259 258 */ 260 259 rds_iwdev = ib_get_client_data(dev, &rds_iw_client); 261 260 if (!rds_iwdev) { 262 - if (printk_ratelimit()) 263 - printk(KERN_NOTICE "RDS/IW: No client_data for device %s\n", 261 + printk_ratelimited(KERN_NOTICE "RDS/IW: No client_data for device %s\n", 264 262 dev->name); 265 263 return -EOPNOTSUPP; 266 264 } ··· 365 365 version = RDS_PROTOCOL_3_0; 366 366 while ((common >>= 1) != 0) 367 367 version++; 368 - } else if (printk_ratelimit()) { 369 - printk(KERN_NOTICE "RDS: Connection from %pI4 using " 368 + } 369 + printk_ratelimited(KERN_NOTICE "RDS: Connection from %pI4 using " 370 370 "incompatible protocol version %u.%u\n", 371 371 &dp->dp_saddr, 372 372 dp->dp_protocol_major, 373 373 dp->dp_protocol_minor); 374 - } 375 374 return version; 376 375 } 377 376
+5 -4
net/rds/iw_rdma.c
··· 32 32 */ 33 33 #include <linux/kernel.h> 34 34 #include <linux/slab.h> 35 + #include <linux/ratelimit.h> 35 36 36 37 #include "rds.h" 37 38 #include "iw.h" ··· 730 729 failed_wr = &f_wr; 731 730 ret = ib_post_send(ibmr->cm_id->qp, &f_wr, &failed_wr); 732 731 BUG_ON(failed_wr != &f_wr); 733 - if (ret && printk_ratelimit()) 734 - printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n", 732 + if (ret) 733 + printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n", 735 734 __func__, __LINE__, ret); 736 735 return ret; 737 736 } ··· 752 751 753 752 failed_wr = &s_wr; 754 753 ret = ib_post_send(ibmr->cm_id->qp, &s_wr, &failed_wr); 755 - if (ret && printk_ratelimit()) { 756 - printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n", 754 + if (ret) { 755 + printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n", 757 756 __func__, __LINE__, ret); 758 757 goto out; 759 758 }
+2 -2
net/rds/iw_send.c
··· 34 34 #include <linux/in.h> 35 35 #include <linux/device.h> 36 36 #include <linux/dmapool.h> 37 + #include <linux/ratelimit.h> 37 38 38 39 #include "rds.h" 39 40 #include "iw.h" ··· 259 258 * when the SEND completes. */ 260 259 break; 261 260 default: 262 - if (printk_ratelimit()) 263 - printk(KERN_NOTICE 261 + printk_ratelimited(KERN_NOTICE 264 262 "RDS/IW: %s: unexpected opcode 0x%x in WR!\n", 265 263 __func__, send->s_wr.opcode); 266 264 break;
+3 -4
net/rds/send.c
··· 35 35 #include <net/sock.h> 36 36 #include <linux/in.h> 37 37 #include <linux/list.h> 38 + #include <linux/ratelimit.h> 38 39 39 40 #include "rds.h" 40 41 ··· 1007 1006 goto out; 1008 1007 1009 1008 if (rm->rdma.op_active && !conn->c_trans->xmit_rdma) { 1010 - if (printk_ratelimit()) 1011 - printk(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", 1009 + printk_ratelimited(KERN_NOTICE "rdma_op %p conn xmit_rdma %p\n", 1012 1010 &rm->rdma, conn->c_trans->xmit_rdma); 1013 1011 ret = -EOPNOTSUPP; 1014 1012 goto out; 1015 1013 } 1016 1014 1017 1015 if (rm->atomic.op_active && !conn->c_trans->xmit_atomic) { 1018 - if (printk_ratelimit()) 1019 - printk(KERN_NOTICE "atomic_op %p conn xmit_atomic %p\n", 1016 + printk_ratelimited(KERN_NOTICE "atomic_op %p conn xmit_atomic %p\n", 1020 1017 &rm->atomic, conn->c_trans->xmit_atomic); 1021 1018 ret = -EOPNOTSUPP; 1022 1019 goto out;