linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	Michael Schmitz <schmitz@debian.org>,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-m68k@vger.kernel.org
Subject: [PATCH 1/4] ide: remove IDE_ARCH_INTR
Date: Tue, 27 Jan 2009 19:02:52 +0100	[thread overview]
Message-ID: <20090127180252.28089.70513.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20090127180246.28089.2981.sendpatchset@localhost.localdomain>

From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] ide: remove IDE_ARCH_INTR

This micro-optimization is not worth it.  Just always check for
existence of ->ack_intr method in ide_intr() and ide_timer_expiry().

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michael Schmitz <schmitz@debian.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-io.c   |    5 +++--
 include/asm-m68k/ide.h |    3 ---
 include/linux/ide.h    |    5 -----
 3 files changed, 3 insertions(+), 10 deletions(-)

Index: b/drivers/ide/ide-io.c
===================================================================
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -736,7 +736,8 @@ void ide_timer_expiry (unsigned long dat
 		} else if (drive_is_ready(drive)) {
 			if (drive->waiting_for_dma)
 				hwif->dma_ops->dma_lost_irq(drive);
-			(void)ide_ack_intr(hwif);
+			if (hwif->ack_intr(hwif))
+				hwif->ack_intr(hwif);
 			printk(KERN_WARNING "%s: lost interrupt\n",
 				drive->name);
 			startstop = handler(drive);
@@ -851,7 +852,7 @@ irqreturn_t ide_intr (int irq, void *dev
 
 	spin_lock_irqsave(&hwif->lock, flags);
 
-	if (!ide_ack_intr(hwif))
+	if (hwif->ack_intr && hwif->ack_intr(hwif) == 0)
 		goto out;
 
 	handler = hwif->handler;
Index: b/include/asm-m68k/ide.h
===================================================================
--- a/include/asm-m68k/ide.h
+++ b/include/asm-m68k/ide.h
@@ -123,8 +123,5 @@ ide_get_lock(irq_handler_t handler, void
 }
 #endif /* CONFIG_BLK_DEV_FALCON_IDE */
 
-#define IDE_ARCH_ACK_INTR
-#define ide_ack_intr(hwif)	((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1)
-
 #endif /* __KERNEL__ */
 #endif /* _M68K_IDE_H */
Index: b/include/linux/ide.h
===================================================================
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -202,11 +202,6 @@ static inline void ide_std_init_ports(hw
 
 #define MAX_HWIFS	10
 
-/* Currently only m68k, apus and m8xx need it */
-#ifndef IDE_ARCH_ACK_INTR
-# define ide_ack_intr(hwif) (1)
-#endif
-
 /* Currently only Atari needs it */
 #ifndef IDE_ARCH_LOCK
 # define ide_release_lock()			do {} while (0)

  reply	other threads:[~2009-01-27 18:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27 18:02 [PATCH 0/4] m68k related IDE cleanups Bartlomiej Zolnierkiewicz
2009-01-27 18:02 ` Bartlomiej Zolnierkiewicz [this message]
2009-01-27 19:42   ` [PATCH 1/4] ide: remove IDE_ARCH_INTR David D. Kilzer
2009-01-29  4:22     ` Michael Schmitz
2009-02-01 15:53       ` Bartlomiej Zolnierkiewicz
2009-01-27 18:02 ` [PATCH 2/4] ide: remove IDE_ARCH_LOCK Bartlomiej Zolnierkiewicz
2009-02-04 21:27   ` Geert Uytterhoeven
2009-02-05 20:14     ` Bartlomiej Zolnierkiewicz
2009-01-27 18:03 ` [PATCH 3/4] ide: make m68k host drivers use IDE_HFLAG_MMIO Bartlomiej Zolnierkiewicz
2009-01-27 18:03 ` [PATCH 4/4] m68k: cleanup <asm/ide.h> Bartlomiej Zolnierkiewicz

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=20090127180252.28089.70513.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=schmitz@debian.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 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).