linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
To: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	trivial@kernel.org
Subject: [PATCH 6/8] drivers/gpu/drm: use printk_ratelimited instead of printk_ratelimit
Date: Sat, 4 Jun 2011 17:36:43 +0200	[thread overview]
Message-ID: <1a0239725c12da764545a3bd1118a386a0216645.1307199715.git.christian.dietrich@informatik.uni-erlangen.de> (raw)
In-Reply-To: <cover.1307199715.git.christian.dietrich@informatik.uni-erlangen.de>

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

Signed-off-by: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
---
 drivers/gpu/drm/drm_ioc32.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index d61d185..4a058c7 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -28,6 +28,7 @@
  * IN THE SOFTWARE.
  */
 #include <linux/compat.h>
+#include <linux/ratelimit.h>
 
 #include "drmP.h"
 #include "drm_core.h"
@@ -253,10 +254,10 @@ static int compat_drm_addmap(struct file *file, unsigned int cmd,
 		return -EFAULT;
 
 	m32.handle = (unsigned long)handle;
-	if (m32.handle != (unsigned long)handle && printk_ratelimit())
-		printk(KERN_ERR "compat_drm_addmap truncated handle"
-		       " %p for type %d offset %x\n",
-		       handle, m32.type, m32.offset);
+	if (m32.handle != (unsigned long)handle)
+		printk_ratelimited(KERN_ERR "compat_drm_addmap truncated handle"
+				   " %p for type %d offset %x\n",
+				   handle, m32.type, m32.offset);
 
 	if (copy_to_user(argp, &m32, sizeof(m32)))
 		return -EFAULT;
-- 
1.7.1


  parent reply	other threads:[~2011-06-04 15:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1307199715.git.christian.dietrich@informatik.uni-erlangen.de>
2011-06-04 15:35 ` [PATCH 1/8] powerpc/rtas-rtc: remove sideeffects of printk_ratelimit Christian Dietrich
2011-06-04 15:35 ` [PATCH 2/8] drivers/octeon: use printk_ratelimited instead " Christian Dietrich
2011-06-04 15:36 ` [PATCH 3/8] scsi/sg: " Christian Dietrich
2011-06-04 15:36 ` [PATCH 4/8] md/raid: " Christian Dietrich
2011-06-28  6:45   ` NeilBrown
2011-06-04 15:36 ` [PATCH 5/8] drivers/char/rtc: " Christian Dietrich
2011-06-04 15:36 ` Christian Dietrich [this message]
2011-06-04 15:36 ` [PATCH 7/8] arch/powerpc: " Christian Dietrich
2011-06-04 15:37 ` [PATCH 8/8] arch/x86: " Christian Dietrich
2011-06-06  6:35   ` Rusty Russell
2011-06-06  8:11     ` richard -rw- weinberger
2011-06-07  3:11       ` Rusty Russell
2011-06-07  3:37         ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1a0239725c12da764545a3bd1118a386a0216645.1307199715.git.christian.dietrich@informatik.uni-erlangen.de \
    --to=christian.dietrich@informatik.uni-erlangen.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).