* [2.6 patch] scsi/advansys.c: fix compile errors
@ 2008-05-21 17:41 Adrian Bunk
2008-05-21 19:53 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2008-05-21 17:41 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, linux-kernel
This patch fixes the following compile error on architectures not
providing free_dma():
<-- snip -->
...
CC [M] drivers/scsi/advansys.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c: In function 'advansys_board_found':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:13876: error: implicit declaration of function 'free_dma'
make[3]: *** [drivers/scsi/advansys.o] Error 1
...
CC [M] drivers/scsi/advansys.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c: In function 'advansys_release':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:13901: error: implicit declaration of function 'free_dma'
make[3]: *** [drivers/scsi/advansys.o] Error 1
<-- snip -->
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
drivers/scsi/advansys.c | 4 ++++
1 file changed, 4 insertions(+)
539dd76b86cea6a8deffcbfdcc9d4e8343939b6f diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 8591585..3b41906 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -13872,8 +13872,10 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost,
advansys_wide_free_mem(boardp);
free_irq(boardp->irq, shost);
err_free_dma:
+#ifdef CONFIG_ISA
if (shost->dma_channel != NO_ISA_DMA)
free_dma(shost->dma_channel);
+#endif
err_free_proc:
kfree(boardp->prtbuf);
err_unmap:
@@ -13894,10 +13896,12 @@ static int advansys_release(struct Scsi_Host *shost)
ASC_DBG(1, "begin\n");
scsi_remove_host(shost);
free_irq(board->irq, shost);
+#ifdef CONFIG_ISA
if (shost->dma_channel != NO_ISA_DMA) {
ASC_DBG(1, "free_dma()\n");
free_dma(shost->dma_channel);
}
+#endif
if (ASC_NARROW_BOARD(board)) {
dma_unmap_single(board->dev,
board->dvc_var.asc_dvc_var.overrun_dma,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [2.6 patch] scsi/advansys.c: fix compile errors
2008-05-21 17:41 [2.6 patch] scsi/advansys.c: fix compile errors Adrian Bunk
@ 2008-05-21 19:53 ` Matthew Wilcox
2008-05-21 20:07 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2008-05-21 19:53 UTC (permalink / raw)
To: Adrian Bunk; +Cc: James.Bottomley, linux-scsi, linux-kernel
On Wed, May 21, 2008 at 08:41:52PM +0300, Adrian Bunk wrote:
> This patch fixes the following compile error on architectures not
> providing free_dma():
Last time this came up, I think the consensus was that those
architectures should be providing a stub free_dma().
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] scsi/advansys.c: fix compile errors
2008-05-21 19:53 ` Matthew Wilcox
@ 2008-05-21 20:07 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2008-05-21 20:07 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: James.Bottomley, linux-scsi, linux-kernel
On Wed, May 21, 2008 at 01:53:33PM -0600, Matthew Wilcox wrote:
> On Wed, May 21, 2008 at 08:41:52PM +0300, Adrian Bunk wrote:
> > This patch fixes the following compile error on architectures not
> > providing free_dma():
>
> Last time this came up, I think the consensus was that those
> architectures should be providing a stub free_dma().
I tried building as many modules as possible on frv, and this was the
only driver that failed this way.
Another possibility would be to let this driver depend on ISA_DMA_API
(similar to e.g. SCSI_EATA).
Sorry for being lazy, but touching X architectures for fixing the
compiliation of a driver whose hardware will anyway most likely never
be used on this architecture is IMHO not worth the effort...
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-05-21 20:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-21 17:41 [2.6 patch] scsi/advansys.c: fix compile errors Adrian Bunk
2008-05-21 19:53 ` Matthew Wilcox
2008-05-21 20:07 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox