Messages in this thread | | | Date | Mon, 8 Feb 2010 22:07:53 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH 2/2] allow printk delay after multi lines |
| |
On Tue, 9 Feb 2010 13:56:34 +0800 Dave Young <hidave.darkstar@gmail.com> wrote:
> BTW, for the sysctl variables. I found in kernel.h there's: > printk/console_loglevel/panic related extern variables for sysctl. > > console_loglevel and panic related variables are used here and there, > not just for sysctl, so I think it should stay in kernel.h. > > The printk related variables for sysctl and all the extern variables in > sysctl.c can be move to sysctl.h. Seems no need new head file. > > Andrew, what's your opinion?
Symbols which are defined in printk.c and which are used in other compilation units should be declared in printk.h!
We mucked up in the past by putting these things in kernel.h and as externs in sysctl.c, but that's no reason to continue to do so. As a special-case, it makes convenience sense to declare printk() itself and the loglevel strings etc in kernel.h, but that _is_ a special case.
| |