[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTim=yg+tCxa-JhMYw5zsnBSzQqVnqg@mail.gmail.com>
Date: Mon, 20 Jun 2011 10:17:53 +0200
From: Manuel Zerpies <manuel.f.zerpies@...stud.uni-erlangen.de>
To: Borislav Petkov <bp@...en8.de>,
Manuel Zerpies <manuel.f.zerpies@...stud.uni-erlangen.de>,
"David S. Miller" <davem@...emloft.net>, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org,
christian.dietrich@...ormatik.uni-erlangen.de, sshtylyov@...sta.com
Subject: Re: [PATCH 01/11] drivers/ide: use printk_ratelimited() instead of printk_ratelimit()
Hello,
2011/6/16 Borislav Petkov <bp@...en8.de>
>
> On Thu, Jun 16, 2011 at 02:06:37PM +0200, Manuel Zerpies wrote:
>
> Does the printk fit on one line if you do
>
> pr_warn_ratelimited(...)
>
> instead?
>
> Thanks.
>
> --
> Regards/Gruss,
> Boris.
No I'm affraid. I tried it, but it didn't fit the 80 chars per line
code-styling.
>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().
Signed-off-by: Manuel Zerpies <manuel.f.zerpies@...stud.uni-erlangen.de>
---
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 @@
#include <linux/ide.h>
#include <linux/scatterlist.h>
#include <linux/gfp.h>
+#include <linux/ratelimit.h>
#include <scsi/scsi.h>
@@ -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,
GFP_NOIO);
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);
return;
}
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists