Re: [PATCH 01/11] drivers/ide: use printk_ratelimited() instead ofprintk_ratelimit()

From: Sergei Shtylyov
Date: Mon Jun 20 2011 - 04:23:27 EST


On 20-06-2011 12:17, Manuel Zerpies wrote:

Does the printk fit on one line if you do





No I'm affraid. I tried it, but it didn't fit the 80 chars per line

It's enough that the string literal fits on one line.

Why not pr_warn_ratelimited()?

WBR, Sergei

I just kind of ignored it. As you see, I built it in.

Here my new patch:

Since printk_ratelimit() shouldn't be used anymore (see comment in
include/linux/printk.h), replace it with printk_ratelimited().

This doesn't match the patch anymore...

Signed-off-by: Manuel Zerpies <manuel.f.zerpies@xxxxxxxxxxxxxxxxxxxxxxx>
drivers/ide/ide-atapi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index 6f218e01..c9e69d7 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -8,6 +8,7 @@


@@ -200,9 +201,8 @@ void ide_prep_sense(ide_drive_t *drive, struct request *rq)
err = blk_rq_map_kern(drive->queue, sense_rq, sense, sense_len,
if (unlikely(err)) {
- if (printk_ratelimit())
- printk(KERN_WARNING PFX "%s: failed to map sense "
- "buffer\n", drive->name);
+ pr_warn_ratelimited(PFX "%s: failed to map sense buffer\n",
+ drive->name);

Unfortunately, the new patch is whitespace-damaged.

WBR, Sergei
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at