2.6.18-rc5-mm1 ich_pata_cbl_detect returns a value despite being void
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 <[email protected]>
drivers/ata/ata_piix.c +4 -2
@@ -608,8 +608,10 @@ static void ich_pata_cbl_detect(struct awhile (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++; }
Signature · 1 line
VGER BF report: U 0.500037
Alan Cox
Acked-byAr Llu, 2006-09-04 am 12:04 +0000, ysgrifennodd Frederik Deweerdt:
Quoted 8 lines
Hi,
Compiling 2.6.18-rc5-mm1 issues the following warning:
CCdrivers/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 <[email protected]>
Signature · 1 line
VGER BF report: H 0.0204275