linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide.c: microscopic size and readability optimization
@ 2007-05-17 11:25 Borislav Petkov
  2007-05-17 11:33 ` Paul Sokolovsky
  2007-05-17 12:06 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Borislav Petkov @ 2007-05-17 11:25 UTC (permalink / raw)
  To: bzolnier; +Cc: linux-ide, lkml

-----
From: bbpetkov@yahoo.de

A very small size (object file 432 bytes smaller) and readability optimization of ide.c

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>

--
Index: 22-rc1/drivers/ide/ide.c
===================================================================
--- 22-rc1/drivers/ide/ide.c.orig
+++ 22-rc1/drivers/ide/ide.c
@@ -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];

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

end of thread, other threads:[~2007-05-18  8:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-17 11:25 [PATCH] ide.c: microscopic size and readability optimization Borislav Petkov
2007-05-17 11:33 ` Paul Sokolovsky
2007-05-17 12:06 ` Alan Cox
2007-05-18  8:28   ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).