Messages in this thread | | | Subject | Re: [PATCH] printk: deduplicate print_prefix() calls | From | Tetsuo Handa <> | Date | Mon, 26 Nov 2018 19:21:13 +0900 |
| |
On 2018/11/26 16:56, Sergey Senozhatsky wrote: > Or we can "copy" the value of printk_time and use it in print_prefix(), > and we will pick up an updated value next time we do msg_print_text()?
Yes, that is also possible. But it would be better to pass as a function argument to print_prefix() rather than adding a global variable, and omit calling print_time() if the passed argument is false. But however, removing print_prefix() reduces object size, for it eliminates redundant instructions.
| |