public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.6.18-rc5-mm1 ich_pata_cbl_detect returns a value despite being void
  2006-09-04 12:04 2.6.18-rc5-mm1 ich_pata_cbl_detect returns a value despite being void Frederik Deweerdt
@ 2006-09-04 10:39 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2006-09-04 10:39 UTC (permalink / raw)
  To: Frederik Deweerdt; +Cc: jeff, akpm, linux-kernel

Ar Llu, 2006-09-04 am 12:04 +0000, ysgrifennodd Frederik Deweerdt:
> Hi,
> 
> Compiling 2.6.18-rc5-mm1 issues the following warning:
>   CC      drivers/ata/ata_piix.o
>   drivers/ata/ata_piix.c: In function 'ich_pata_cbl_detect':
>   drivers/ata/ata_piix.c:612: warning: 'return' with a value, in
>   function returning void
> 


Yep already fixed in my tree. Your fix is correct.

Acked-by: Alan Cox <alan@redhat.com>


-- 
VGER BF report: H 0.0204275

^ permalink raw reply	[flat|nested] 2+ messages in thread

* 2.6.18-rc5-mm1 ich_pata_cbl_detect returns a value despite being void
@ 2006-09-04 12:04 Frederik Deweerdt
  2006-09-04 10:39 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Frederik Deweerdt @ 2006-09-04 12:04 UTC (permalink / raw)
  To: jeff; +Cc: alan, akpm, linux-kernel

Hi,

Compiling 2.6.18-rc5-mm1 issues the following warning:
  CC      drivers/ata/ata_piix.o
  drivers/ata/ata_piix.c: In function 'ich_pata_cbl_detect':
  drivers/ata/ata_piix.c:612: warning: 'return' with a value, in
  function returning void

This was introduced by the
libata-add-40pin-short-cable-support-honour-drive.patch.
The attached patch fixes the issue by assigning ap->cbl.

Regards,
Frederik

Signed-off-by: Frederik Deweerdt <deweerdt@free.fr>
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index e4d7873..c9c8341 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -608,8 +608,10 @@ static void ich_pata_cbl_detect(struct a
 	while (lap->device) {
 		if (lap->device == pdev->device &&
 		    lap->subvendor == pdev->subsystem_vendor &&
-		    lap->subdevice == pdev->subsystem_device)
-		    	return ATA_CBL_PATA40_SHORT;
+		    lap->subdevice == pdev->subsystem_device) {
+			ap->cbl = ATA_CBL_PATA40_SHORT;
+		    	return;
+		}
 		lap++;
 	}
 

-- 
VGER BF report: U 0.500037

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-09-04 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-04 12:04 2.6.18-rc5-mm1 ich_pata_cbl_detect returns a value despite being void Frederik Deweerdt
2006-09-04 10:39 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox