removes unnessary print of space
PATCH 1/1 removes unnessary print of space
This patch removes unnessary print of space in bust_spinlocks(). printk("") wakeups klogd as well, no need to print a space and make a mess.
Kirill
arch/i386/mm/fault.c renamed from arch/i386/mm/fault.c.printk +1 -1
@@ -51,7 +51,7 @@ void bust_spinlocks(int yes)* a poke. Hold onto your hats... */ console_loglevel =15 ;/* NMI oopser may have shut the console up */ -printk (" " ); +printk ("" ); console_loglevel = loglevel_save; }
Quoted 3 lines · Kirill Korotaev
This patch removes unnessary print of space in
bust_spinlocks().
printk("")wakeups klogd as well,
Until some smarty comes along and optimises printk() to skip empty strings.
An explicit wake_up_klogd() thing might make sense, rather than relying upon side-effects.
Quoted 1 line
no need to print a space and make a mess.
Can't say that I've ever noticed that space.
Quoted 4 lines · Kirill Korotaev
This patch removes unnessary print of space in
bust_spinlocks().printk("")wakeups klogd as well, no need to print a space and make a mess.
I may be just a newbie, but why call prink with no arguments? Does it do something?
arch/i386/mm/fault.c void bust_spinlocks(int yes) · line 57
Quoted 13 lines
------------------------------------------------------------------------
arch/i386/mm/fault.c renamed from arch/i386/mm/fault.c.printk +1
-1@@ -51,7 +51,7 @@ void bust_spinlocks(int yes)* a poke. Hold onto your hats... */ console_loglevel =15 ;/* NMI oopser may have shut the console up */ -printk (" " ); +printk ("" ); console_loglevel = loglevel_save; }
Kalin.
Signature · 3 lines
|| ~~~~~~~~~~~~~~~~~~~~~~ || ( ) http://ThinRope.net/ ( ) || ______________________ ||
Quoted 7 lines
Quoted 2 lines
This patch removes unnessary print of space in
bust_spinlocks().printk("")wakeups klogd as well,Until some smarty comes along and optimises
printk()to skip empty strings.An explicit
wake_up_klogd()thing might make sense, rather than relying upon side-effects.
yup, you are right. I was the easiest, but not the best. I'll make a patch with wakeup_klogd.
Quoted 2 lines
Quoted 1 line
no need to print a space and make a mess.
Can't say that I've ever noticed that space.
We did. Many times.
I've noticed another thing. There is a default bust_spinlocks() in lib/bust_spinlocks.c. 4 architectures including x86 have their own copies of it, which are exactly the same as the default one.
So do we really need lib/bust_spinlocks.c or we can move a signle copy of this function to kernel/printk.c?
Kirill
Quoted 7 lines · Kirill Korotaev
I've noticed another thing. There is a default
bust_spinlocks()in
lib/bust_spinlocks.c. 4 architectures including x86 have their own copies of it, which are exactly the same as the default one.So do we really need
lib/bust_spinlocks.cor we can move a signle copy of this function tokernel/printk.c?
I'd leave it as is - nobody's complaining.
In the more modern scheme of things we'd move that file to kernel/ and require that per-arch Kconfigs define CONFIG_NEED_GENERIC_BUST_SPINLOCKS, then use that in kernel/Makefile. But doing that now would be gratuitous noise, IMO.
Salut,
Quoted 2 lines · Kalin KOZHUHAROV
I may be just a newbie, but why call prink with no arguments? Does it do something?
Actually, there is an argument: a NULL terminated string of size 0.
It pokes the klogd. This can be done much better throughwake_up_klogd() though.
Tonnerre
Quoted 2 lines · Andrew Morton
Until some smarty comes along and optimises
printk()to skip empty strings.
define the bahavior to disallow that
Quoted 2 lines
An explicit
wake_up_klogd()thing might make sense, rather than relying upon side-effects.
what about something like:
#define wake_up_klogd() (printk(NULL))
then? and have printk short-circuit where required when it gets NULL but still wake the console up?
--cw
On Mon, 06 Sep 2004 12:34:37 +0400 Kirill Korotaev wrote:
| >>This patch removes unnessary print of space in bust_spinlocks().
| >> printk("") wakeups klogd as well,
| >
| > Until some smarty comes along and optimises printk() to skip empty strings.
| >
| > An explicit wake_up_klogd() thing might make sense, rather than relying
| > upon side-effects.
| yup, you are right. I was the easiest, but not the best.
| I'll make a patch with wakeup_klogd.
|
| >>no need to print a space and make a mess.
| > Can't say that I've ever noticed that space.
| We did. Many times.Same here. Thanks for cleaning it up.
| I've noticed another thing. There is a default bust_spinlocks() in | lib/bust_spinlocks.c. 4 architectures including x86 have their own | copies of it, which are exactly the same as the default one. | | So do we really need lib/bust_spinlocks.c or we can move a signle copy | of this function to kernel/printk.c?
--
~Randy