2008-02-14 05:19:00

by Harvey Harrison

[permalink] [raw]
Subject: [PATCH 09/11] ata: fix sparse warning in pata_marvell.c

drivers/ata/pata_marvell.c:88:2: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <[email protected]>
---
drivers/ata/pata_marvell.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 9afc8a3..a81f25d 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -85,8 +85,8 @@ static int marvell_cable_detect(struct ata_port *ap)

static void marvell_error_handler(struct ata_port *ap)
{
- return ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset,
- NULL, ata_std_postreset);
+ ata_bmdma_drive_eh(ap, marvell_pre_reset, ata_std_softreset, NULL,
+ ata_std_postreset);
}

/* No PIO or DMA methods needed for this device */
--
1.5.4.1.1278.gc75be


2008-02-15 14:29:59

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [PATCH 09/11] ata: fix sparse warning in pata_marvell.c


On Feb 13 2008 21:14, Harvey Harrison wrote:
>drivers/ata/pata_marvell.c:88:2: warning: returning void-valued expression

This is interesting. Why did not gcc warn us about this?

(foo.c:3: warning: "return" with a value, in function returning void)