mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: "J.A. Magallon" <jamagallon@able.es>
Cc: Linux-Kernel <linux-kernel@vger.kernel.org>, netdev@vger.kernel.org
Subject: Re: [PATCH] kill massive wireless-related log spam
Date: Wed, 26 Oct 2005 23:43:59 +0200	[thread overview]
Message-ID: <9a8748490510261443y7ea58a8amcb928135db91cb4f@mail.gmail.com> (raw)
In-Reply-To: <AB480DAC-57B0-4125-8BA5-D6C715B693B6@able.es>

On 10/26/05, J.A. Magallon <jamagallon@able.es> wrote:
>
> On 2005.10.26, at 17:23, Jesper Juhl wrote:
>
> > On 10/26/05, Andi Kleen <ak@suse.de> wrote:
> >
> >> On Wednesday 26 October 2005 06:28, Jeff Garzik wrote:
> >>
> >>
> >>> Change this to printing out the message once, per kernel boot.
> >>>
> >>
> >> It doesn't do that. It prints it once every 2^32 calls. Also
> >>
> >
> > I noted that as well. How about just using something along the
> > lines of
> >
> > static unsigned char printed_message = 0;
> > if (!printed_message) {
> >     printk(...);
> >     printed_message++;
> > }
>
> Sorry, but why not the old good
>
>      printed_message = 1
>
> ??
> What kind of microoptimization is that ?
>
Does it really matter?   I needed to pick one of
printed_message=1; or printed_message++;
the end result is the same, so I just picked one at random.
But now that you mention it, I guess ++ would turn into "inc" which
should be faster than an assignment... but it *doesn't matter*... I
was not trying to optimize anything, just make the code work properly
- as in, only ever print the message once...


--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

  reply	other threads:[~2005-10-26 21:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26  4:28 Jeff Garzik
2005-10-26 15:04 ` Andi Kleen
2005-10-26 15:23   ` Jesper Juhl
2005-10-26 21:23     ` J.A. Magallon
2005-10-26 21:43       ` Jesper Juhl [this message]
2005-10-26 15:42   ` Jeff Garzik
2005-10-27 17:37     ` Horst von Brand

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=9a8748490510261443y7ea58a8amcb928135db91cb4f@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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®