mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* CONFIG_PRINTK doesn't makes size smaller
@ 2005-09-20  6:14 colin
  2005-09-20  6:38 ` Andrey Panin
  2005-09-20  8:30 ` Denis Vlasenko
  0 siblings, 2 replies; 8+ messages in thread
From: colin @ 2005-09-20  6:14 UTC (permalink / raw)
  To: linux-kernel


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.

Regards,
Colin



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-09-20 15:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-20  6:14 CONFIG_PRINTK doesn't makes size smaller colin
2005-09-20  6:38 ` Andrey Panin
2005-09-20  7:48   ` Vadim Lobanov
2005-09-20  8:03     ` Andrew Morton
2005-09-20  9:11       ` colin
2005-09-20  9:02     ` Andrey Panin
2005-09-20 15:41       ` Vadim Lobanov
2005-09-20  8:30 ` Denis Vlasenko

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®