lkml.org 
[lkml]   [2008]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] Sectionized printk data

On Feb 4 2008 19:07, Sam Ravnborg wrote:
>> 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?

To drop strings that are only shown once anyway, such as:

static int __init ebtables_init(void)
{
int ret;

mutex_lock(&ebt_mutex);
list_add(&ebt_standard_target.list, &ebt_targets);
mutex_unlock(&ebt_mutex);
if ((ret = nf_register_sockopt(&ebt_sockopts)) < 0)
return ret;

-> printk(KERN_INFO "Ebtables v2.0 registered\n");
return 0;
}

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


\
 
 \ /
  Last update: 2008-02-09 23:11    [W:0.152 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site