编译2.6.32kernel,报如下错误:
drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
drivers/scsi/advansys.c: In function `advansys_get_sense_buffer_dma':
drivers/scsi/advansys.c:9885: error: implicit declaration of function `dma_cache_sync'
make[2]: *** [drivers/scsi/advansys.o] Error 1
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
implicit declaration of function `dma_cache_sync'表示隐式声明错误,可能有几个原因:
1 没有把函数所在的c文件生成.o目标文件
2 在函数所在的c文件中定义了,但是没有在与之相关联的.h文件中声明
reference:
http://hi.baidu.com/caosicong/blog/item/17e3f8d6f4d1862a06088b79.html查找arch\arm\include\asm\dma-mapping.h下没有这个函数声明,但有如下注释:
/*
* Dummy noncoherent implementation. We don't provide a dma_cache_sync
* function so drivers using this API are highlighted with build warnings.
*/
晕了,不用为什么还在程序里有这个函数?直接在advansys.c中把
dma_cache_sync(board->dev, scp->sense_buffer,
SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE);
注释掉,编译就OK了,这个也算是bug了。
阅读(240) | 评论(0) | 转发(0) |