summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet
diff options
context:
space:
mode:
authorKonrad Malkowski <konrad.malkowski@gmail.com>2017-05-25 23:01:20 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-03 17:32:41 +0900
commit93e7ea8ca0ba8959ccd8e7555fe2c3cb3a2530e5 (patch)
tree9ea421799b26df0f27ed012c1ab2e8fd379b8120 /drivers/staging/lustre/lnet
parent57d14635f976404fac165047389ff0dbe83bcd5b (diff)
staging: lustre: Replace printk_ratelimited with pr_warn_ratelimited
This patch fixes the checkpoint.pl warning: WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit Signed-off-by: Konrad Malkowski <konrad.malkowski@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet')
-rw-r--r--drivers/staging/lustre/lnet/libcfs/tracefile.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lnet/libcfs/tracefile.c b/drivers/staging/lustre/lnet/libcfs/tracefile.c
index 9599b7441feb..a0efea4be08d 100644
--- a/drivers/staging/lustre/lnet/libcfs/tracefile.c
+++ b/drivers/staging/lustre/lnet/libcfs/tracefile.c
@@ -191,10 +191,9 @@ cfs_trace_get_tage_try(struct cfs_trace_cpu_data *tcd, unsigned long len)
} else {
tage = cfs_tage_alloc(GFP_ATOMIC);
if (unlikely(!tage)) {
- if ((!memory_pressure_get() ||
- in_interrupt()) && printk_ratelimit())
- pr_warn("cannot allocate a tage (%ld)\n",
- tcd->tcd_cur_pages);
+ if (!memory_pressure_get() || in_interrupt())
+ pr_warn_ratelimited("cannot allocate a tage (%ld)\n",
+ tcd->tcd_cur_pages);
return NULL;
}
}
@@ -229,9 +228,8 @@ static void cfs_tcd_shrink(struct cfs_trace_cpu_data *tcd)
* from here: this will lead to infinite recursion.
*/
- if (printk_ratelimit())
- pr_warn("debug daemon buffer overflowed; discarding 10%% of pages (%d of %ld)\n",
- pgcount + 1, tcd->tcd_cur_pages);
+ pr_warn_ratelimited("debug daemon buffer overflowed; discarding 10%% of pages (%d of %ld)\n",
+ pgcount + 1, tcd->tcd_cur_pages);
INIT_LIST_HEAD(&pc.pc_pages);