From: zippel@fh-brandenburg.de (Roman Zippel)
Subject: Re: L68K: 2.1.77 is out
To: Geert.Uytterhoeven@cs.kuleuven.ac.be (Geert Uytterhoeven)
Date: Mon, 12 Jan 1998 15:07:30 +0100 (MET)
Cc: linux-m68k@lists.linux-m68k.org
In-Reply-To: <Pine.LNX.3.96.980112142334.13924b-100000@mercator.cs.kuleuven.ac.be> from "Geert Uytterhoeven" at Jan 12, 98 02:29:48 pm
Sender: owner-linux-m68k@phil.uni-sb.de

Hi,

> > -	if (!ide_ack_intr(hwif->io_ports[IDE_STATUS_OFFSET], hwif->io_ports[IDE_IRQ_OFFSET]))
> > +	if (!ide_ack_intr(hwif, hwif->io_ports[IDE_STATUS_OFFSET], hwif->io_ports[IDE_IRQ_OFFSET]))
> 
> It's not necessary to pass hwif->io_ports[IDE_STATUS_OFFSET] and
> hwif->io_ports[IDE_IRQ_OFFSET] if you pass hwif. That can be done in the
> acknowledge function itself.

I don't know the intention of the one who did the change, but it seems
e.g. sparc and ppc wants to inline the right function, but then we only
need to change the function in asm-sparc64 to accept the single hwif.
The patch below does this (apply it over the other one).

Roman

--- linux-2.1.77/drivers/block/ide.c.old	Mon Jan 12 14:51:35 1998
+++ linux-2.1.77/drivers/block/ide.c	Mon Jan 12 14:52:49 1998
@@ -1746,7 +1746,7 @@
 	ide_hwif_t *hwif = hwgroup->hwif;
 	ide_handler_t *handler;
 
-	if (!ide_ack_intr(hwif, hwif->io_ports[IDE_STATUS_OFFSET], hwif->io_ports[IDE_IRQ_OFFSET]))
+	if (!ide_ack_intr(hwif))
 		return;
 
 	do {
--- linux-2.1.77/include/asm-m68k/ide.h.old	Mon Jan 12 14:53:16 1998
+++ linux-2.1.77/include/asm-m68k/ide.h	Mon Jan 12 14:53:38 1998
@@ -406,7 +406,7 @@
 #endif /* CONFIG_ATARI */
 }
 
-#define ide_ack_intr(hwif, base, irq) (hwif)->ack_intr((hwif))
+#define ide_ack_intr(hwif) (hwif)->ack_intr((hwif))
 
 /*
  * On the Atari, we sometimes can't enable interrupts:
--- linux-2.1.77/include/asm-ppc/ide.h.old	Mon Jan 12 14:57:28 1998
+++ linux-2.1.77/include/asm-ppc/ide.h	Mon Jan 12 14:57:59 1998
@@ -159,7 +159,7 @@
 /*
  * The following are not needed for the non-m68k ports
  */
-#define ide_ack_intr(hwif, base, irq)	(1)
+#define ide_ack_intr(hwif)		(1)
 #define ide_release_lock(lock)		do {} while (0)
 #define ide_get_lock(lock, hdlr, data)	do {} while (0)
 
--- linux-2.1.77/include/asm-sparc64/ide.h.old	Mon Jan 12 14:53:55 1998
+++ linux-2.1.77/include/asm-sparc64/ide.h	Mon Jan 12 14:57:12 1998
@@ -100,9 +100,9 @@
 #undef  HD_DATA
 #define HD_DATA ((ide_ioreg_t)0)
 
-static __inline__ int ide_ack_intr(ide_hwif_t *hwif, ide_ioreg_t status_port,
-				   ide_ioreg_t irq_port)
+static __inline__ int ide_ack_intr(ide_hwif_t *hwif)
 {
+	ide_ioreg_t irq_port = hwif->io_ports[IDE_IRQ_OFFSET];
 	unsigned char stat = inb(irq_port);
 
 	if(stat & 0x4) {
