Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] sgiwd93: Fix compilation warning

The remove() callback in platform drivers should return int in
accordance to the definition of the platform_driver structure.
However, the SGI-specific WD93 SCSI controller driver defines
the callback as a void function, which causes the following
compilation warning:

drivers/scsi/sgiwd93.c:314: warning: initialization from
incompatible pointer type

This patch fixes the warning by changing the return type of
the remove() callback to what the core driver code requires.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>

authored by

Dmitri Vorobiev and committed by
James Bottomley
b99b4c67 752b3232

+2 -1
+2 -1
drivers/scsi/sgiwd93.c
··· 297 297 return err; 298 298 } 299 299 300 - static void __exit sgiwd93_remove(struct platform_device *pdev) 300 + static int __exit sgiwd93_remove(struct platform_device *pdev) 301 301 { 302 302 struct Scsi_Host *host = platform_get_drvdata(pdev); 303 303 struct ip22_hostdata *hdata = (struct ip22_hostdata *) host->hostdata; ··· 307 307 free_irq(pd->irq, host); 308 308 dma_free_noncoherent(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma); 309 309 scsi_host_put(host); 310 + return 0; 310 311 } 311 312 312 313 static struct platform_driver sgiwd93_driver = {