ide.c: microscopic size and readability optimization
PATCH 1/1 ide.c: microscopic size and readability optimization
-----
From: [email protected]
A very small size (object file 432 bytes smaller) and readability optimization of ide.c
--
drivers/ide/ide.c renamed from drivers/ide/ide.c.orig +1 -3
@@ -568,10 +568,8 @@ void ide_unregister(unsigned int index)ide_hwgroup_t *hwgroup;int irq_count =0 , unit; -BUG_ON (index >=MAX_HWIFS ); +BUG_ON (index >=MAX_HWIFS ||in_interrupt () ||irqs_disabled ()); -BUG_ON (in_interrupt ()); -BUG_ON (irqs_disabled ());down (&ide_cfg_sem);spin_lock_irq (&ide_lock); hwif = &ide_hwifs[index];
Hello Borislav,
Quoted 4 lines · you
-----
From: [email protected]A very small size (object file 432 bytes smaller) and readability optimization of
ide.c
And how these "optimizations" fit with BUG_ON() purpose - to
be able to easily identify cause and place of the failure? You could just remove them altogether and claim that you did even "better" "optimization".
Quoted 17 lines
Signed-off-by Borislav Petkov <[email protected]>--
Index:22-rc1/drivers/ide/ide.c
===================================================================drivers/ide/ide.c renamed from drivers/ide/ide.c.orig +1
-3@@ -568,10 +568,8 @@ void ide_unregister(unsigned int index)ide_hwgroup_t *hwgroup;int irq_count =0 , unit; -BUG_ON (index >=MAX_HWIFS ); +BUG_ON (index >=MAX_HWIFS ||in_interrupt () ||irqs_disabled ()); -BUG_ON (in_interrupt ()); -BUG_ON (irqs_disabled ());down (&ide_cfg_sem);
Signature · 2 lines
Best regards, Paul mailto:[email protected]
Quoted 6 lines · On Thu, 17 May 2007 13:25:54 +0200 Borislav Petkov <[email protected]> wrote:
-----
From: [email protected]A very small size (object file 432 bytes smaller) and readability optimization of
ide.cSigned-off-by Borislav Petkov <[email protected]>
Bad idea. Now you won't know which of the conditions caused the BUG() to occur.
Quoted 6 lines · --- Alan Cox
Quoted 3 lines · On Thu, 17 May 2007 13:25:54 +0200 Borislav Petkov <[email protected]> wrote:
-----
From: [email protected]
Quoted 8 lines
Quoted 1 line
A very small size (object file 432 bytes smaller)
and readability optimization of
ide.cQuoted 2 lines
Signed-off-by Borislav Petkov <[email protected]>Bad idea. Now you won't know which of the conditions caused the
BUG()to
occur.
Ups, sorry, that I hadn't considered. Nevermind the noise.
Boris.
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de