mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Paul Mundt" <lethal@linux-sh.org>,
	"Bryan Wu" <cooloney@kernel.org>,
	wim@iguana.be, linux-kernel@vger.kernel.org,
	"Mike Frysinger" <vapier.adi@gmail.com>
Subject: Re: [PATCH 1/1] Blackfin Watchdog Driver: split platform device/driver registering from actual watchdog device/driver registering so we can cleanly load/unload
Date: Wed, 26 Mar 2008 13:19:50 -0400	[thread overview]
Message-ID: <8bd0f97a0803261019o3d4b176eg9817124963b9bc4e@mail.gmail.com> (raw)
In-Reply-To: <20080326163736.GA12632@linux-sh.org>

On Wed, Mar 26, 2008 at 12:37 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> On Wed, Mar 26, 2008 at 06:30:01PM -0700, Bryan Wu wrote:
>  > +#define pr_devinit(fmt, args...) ({ static const __devinitdata char __fmt[] = fmt; printk(__fmt, ## args); })
>  >  #define pr_init(fmt, args...) ({ static const __initdata char __fmt[] = fmt; printk(__fmt, ## args); })
>
>  WTF? You are trying to micro-optimize the string? And you have a printk
>  that changes behaviour if you have hotplug enabled or not. That's so
>  utterly bizarre that the rationale must be fascinating.

the rationale behind it seems fairly obvious to me.  the strings are
placed into the respective init sections so they get released as
needed.  it isnt a matter of tying it to hotplug as tying it to the
function: __init or __devinit.

>  pr_xxx() also is a protected namespace that belongs in
>  include/linux/kernel.h, though I can see why you opted to hide these in
>  your driver rather than post them for general inclusion.

actually, it was already posted to lkml some time ago as an idea.  the
idea stalled so i just use it in my drivers in the meantime.  it's
certainly much cleaner than what was proposed by someone else
originally:
char __init foo[] = "moo";
...
    printk(foo, ...)
...

>  If you are hurting that badly for space, just turn off CONFIG_PRINTK and
>  move on with life. This is just insane.

doing it this way seems pretty clean to me using existing section markings.
-mike

      reply	other threads:[~2008-03-26 17:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27  1:30 Bryan Wu
2008-03-26 11:02 ` Jiri Slaby
2008-03-26 15:02   ` Mike Frysinger
2008-03-26 16:37 ` Paul Mundt
2008-03-26 17:19   ` Mike Frysinger [this message]

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=8bd0f97a0803261019o3d4b176eg9817124963b9bc4e@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=cooloney@kernel.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wim@iguana.be \
    /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®