All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bbpetkov@yahoo.de>
To: bzolnier@gmail.com
Cc: linux-ide@vger.kernel.org, lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH] ide.c: microscopic size and readability optimization
Date: Thu, 17 May 2007 13:25:54 +0200	[thread overview]
Message-ID: <20070517112554.GA32183@zmei.tnic> (raw)

-----
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];

             reply	other threads:[~2007-05-17 11:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 11:25 Borislav Petkov [this message]
2007-05-17 11:33 ` [PATCH] ide.c: microscopic size and readability optimization Paul Sokolovsky
2007-05-17 12:06 ` Alan Cox
2007-05-18  8:28   ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070517112554.GA32183@zmei.tnic \
    --to=bbpetkov@yahoo.de \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.