RDMA/cxgb4: Use printk_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: Roland Dreier <roland@purestorage.com>
This commit is contained in:
Manuel Zerpies 2011-06-16 12:10:40 +00:00 committed by Roland Dreier
parent 620917de59
commit 3cbe182a5b

View File

@ -37,6 +37,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/genalloc.h> #include <linux/genalloc.h>
#include <linux/ratelimit.h>
#include "iw_cxgb4.h" #include "iw_cxgb4.h"
#define RANDOM_SIZE 16 #define RANDOM_SIZE 16
@ -311,8 +312,8 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size); unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size);
PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size); PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size);
if (!addr && printk_ratelimit()) if (!addr)
printk(KERN_WARNING MOD "%s: Out of PBL memory\n", printk_ratelimited(KERN_WARNING MOD "%s: Out of PBL memory\n",
pci_name(rdev->lldi.pdev)); pci_name(rdev->lldi.pdev));
return (u32)addr; return (u32)addr;
} }
@ -373,8 +374,8 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size)
{ {
unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6); unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6);
PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6); PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6);
if (!addr && printk_ratelimit()) if (!addr)
printk(KERN_WARNING MOD "%s: Out of RQT memory\n", printk_ratelimited(KERN_WARNING MOD "%s: Out of RQT memory\n",
pci_name(rdev->lldi.pdev)); pci_name(rdev->lldi.pdev));
return (u32)addr; return (u32)addr;
} }