[PATCH 2.6.21-rc2] pmac ide: fix pmac_ide_dma_host_on() declaration

STALE7105d

2 messages, 2 authors, 2007-03-03 · open the first message on its own page

[PATCH 2.6.21-rc2] pmac ide: fix pmac_ide_dma_host_on() declaration

From: Mikael Pettersson <hidden>
Date: 2007-03-03 13:30:33

Building 2.6.21-rc2 on a PowerMac, I get:

drivers/ide/ppc/pmac.c: In function 'pmac_ide_setup_dma':
drivers/ide/ppc/pmac.c:2042: warning: assignment from incompatible pointer type
drivers/ide/ppc/pmac.c: In function 'pmac_ide_dma_host_on':
drivers/ide/ppc/pmac.c:1988: warning: control reaches end of non-void function

These occur because ->dma_host_on should be a function
returning void, but pmac.c bogusly declares it as returning
int, and furthermore fails to return a value from it.

Correcting the return type to void fixes both warnings.

Signed-off-by: Mikael Pettersson <redacted>
--- linux-2.6.21-rc2/drivers/ide/ppc/pmac.c.~1~	2007-03-03 12:31:07.000000000 +0100
+++ linux-2.6.21-rc2/drivers/ide/ppc/pmac.c	2007-03-03 13:18:56.000000000 +0100
@@ -1983,7 +1983,7 @@ static void pmac_ide_dma_host_off(ide_dr
 {
 }
 
-static int pmac_ide_dma_host_on(ide_drive_t *drive)
+static void pmac_ide_dma_host_on(ide_drive_t *drive)
 {
 }
 

Re: [PATCH 2.6.21-rc2] pmac ide: fix pmac_ide_dma_host_on() declaration

From: Sergei Shtylyov <hidden>
Date: 2007-03-03 17:29:01

Hello.

Mikael Pettersson wrote:
Building 2.6.21-rc2 on a PowerMac, I get:

drivers/ide/ppc/pmac.c: In function 'pmac_ide_setup_dma':
drivers/ide/ppc/pmac.c:2042: warning: assignment from incompatible pointer type
drivers/ide/ppc/pmac.c: In function 'pmac_ide_dma_host_on':
drivers/ide/ppc/pmac.c:1988: warning: control reaches end of non-void function
    This fix is already in the pata-2.6 and -mm trees and has just been pushed 
to Linus:

http://kernel.org/pub/linux/kernel/people/bart/pata-2.6/patches/ide-fix-pmac-breakage.patch

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help