lkml.org 
[lkml]   [2005]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: CONFIG_PRINTK doesn't makes size smaller
Date
On Tuesday 20 September 2005 09:14, colin wrote:
>
> Hi there,
> I tried to make kernel with CONFIG_PRINTK off. I considered it should become
> smaller, but it didn't because it actually isn't an empty function, and
> there are many copies of it in vmlinux, not just one. Here is its
> definition:
> static inline int printk(const char *s, ...) { return 0; }
>
> I change the definition to this and it can greatly reduce the size by about
> 5%:
> #define printk(...) do {} while (0)
> However, this definition would lead to error in some situations. For
> example:
> 1. (printk)
> 2. ret = printk
>
> I hope someone could suggest a better definition of printk that can both
> make printk smaller and eliminate errors.

I think isolated testcase (a preprocessed .c file) would be interesting.
Use make dir/dir/file.i, reduce result to small .c file which shows
the problem, and show it on lkml.
--
vda
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-09-20 11:38    [W:0.059 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site