mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: john stultz <johnstul@us.ibm.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: printk_ratelimited() not compiling
Date: Thu, 18 Feb 2010 14:28:30 -0800	[thread overview]
Message-ID: <1266532110.8446.284.camel@Joe-Laptop.home> (raw)
In-Reply-To: <1266531013.3201.86.camel@localhost.localdomain>

On Thu, 2010-02-18 at 14:10 -0800, john stultz wrote:
> I thought printk_ratelimited would be perfect for an issue I'm
> having, but when I tried using it, replacing a printk I had, I got the
> following:

[]

> fs/namei.c:1075: error: variable ‘_rs’ has initializer but incomplete type

[]

> Am I missing something obvious, or did something get broken after this went in?

Dunno.
Maybe you typed printk_ratelimit not printk_ratelimited?
Can you send the code you're using?

I just tried it in drivers/net/tg3.c and it compiled fine.

diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 7f82b02..cf9b0d8 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -1092,7 +1092,7 @@ static int tg3_mdio_init(struct tg3 *tp)
 
 	i = mdiobus_register(tp->mdio_bus);
 	if (i) {
-		printk(KERN_WARNING "%s: mdiobus_reg failed (0x%x)\n",
+		printk_ratelimited(KERN_WARNING "%s: mdiobus_reg failed (0x%x)\n
 			tp->dev->name, i);
 		mdiobus_free(tp->mdio_bus);
 		return i;



  reply	other threads:[~2010-02-18 22:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 22:10 john stultz
2010-02-18 22:28 ` Joe Perches [this message]
2010-02-18 22:36 ` john stultz
2010-02-18 23:23   ` Joe Perches
2010-02-18 23:33     ` john stultz
2010-02-18 23:49       ` john stultz
2010-02-19  0:15         ` [RFC PATCH] printk_ratelimited: Move definitions to ratelimit.h, use DEFINE_RATELIMIT_STATE 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=1266532110.8446.284.camel@Joe-Laptop.home \
    --to=joe@perches.com \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®