mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Johannes Weiner <hannes@saeurebad.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] Sectionized printk data
Date: Mon, 4 Feb 2008 19:07:53 +0100	[thread overview]
Message-ID: <20080204180753.GB16050@uranus.ravnborg.org> (raw)
In-Reply-To: <87zlugsox9.fsf@saeurebad.de>

On Mon, Feb 04, 2008 at 04:48:34PM +0100, Johannes Weiner wrote:
> Hi,
> 
> current approaches to have printk format strings in the corresponding
> data section to the function they appear in look like the following (at
> least what I have seen so far):
> 
> int __init some_function(void)
> {
> 	static char errmsg[] __initdata = "failure %s in %s\n";
> 
>         [...]
>         printk(errmsg);
>         [...]
> }
> 
> The attached patch allows something along the lines:
> 
> int __init some_function(void)
> {
>         [...]
>         pr_init(KERN_WARNING "failure %s in %s\n", ...);
>         [...]
> }
> 
> Another idea I had was to make printk a macro that figures out the
> section of the surrounding function and then moves the data
> automatically when it is a literal, but I couldn't find mechanisms that
> allow this.  Anyone of you got an idea?
> 
> What do you think in general?

What is the rationale behind this?
In other words why should we investigate time looking into the matter?

If you say "saving memory" then please let us know with specific examples
in what area these savings will really pay off.

Thanks,
	Sam

  reply	other threads:[~2008-02-04 18:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 15:48 Johannes Weiner
2008-02-04 18:07 ` Sam Ravnborg [this message]
2008-02-04 20:23   ` Johannes Weiner
2008-02-09 22:08   ` Jan Engelhardt
2008-02-09 23:54     ` Arnaldo Carvalho de Melo
2008-02-10  0:18       ` Jan Engelhardt
2008-02-10  0:27         ` Arnaldo Carvalho de Melo

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=20080204180753.GB16050@uranus.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=hannes@saeurebad.de \
    --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®