linux-next: build warning after merge of the slave-dma tree
Hi Vinod,
After merging the slave-dma tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:
In file included from drivers/dma/xilinx/xilinx_vdma.c:26:0:include/linux/dmapool.h:18:4: warning: 'struct device' declared inside parameter list
size_t size, size_t align, size_t allocation);
^
include/linux/dmapool.h:18:4: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/dmapool.h:31:7: warning: 'struct device' declared inside parameter list
size_t size, size_t align, size_t allocation);
^
drivers/dma/xilinx/xilinx_vdma.c: In function 'xilinx_vdma_alloc_chan_resources':
drivers/dma/xilinx/xilinx_vdma.c:501:20: warning: passing argument 2 of 'dma_pool_create' from incompatible pointer type
chan->desc_pool = dma_pool_create("xilinx_vdma_desc_pool",
^
In file included from drivers/dma/xilinx/xilinx_vdma.c:26:0:
include/linux/dmapool.h:17:18: note: expected 'struct device *' but argument is of type 'struct device *'
struct dma_pool *dma_pool_create(const char *name, struct device *dev,
^Presumable caused by the include order change in commit 937abe88aea3 ("dmaengine: xilinx-dma: move header file to common location").
I guess that dmapool.h needs a "struct device;" line near the top.
Signature · 2 lines
Cheers, Stephen Rothwell [email protected]
Hi Stephen Rothwell,
I will fix this and will send a patch.
Regards,
Kedar.
Quoted 22 lines · Stephen Rothwell
Hi Vinod,
After merging the slave-dma tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:In file included from
drivers/dma/xilinx/xilinx_vdma.c:26:0:include/linux/dmapool.h:18:4: warning: 'struct device' declared inside parameter listsize_t size, size_t align, size_t allocation); ^ include/linux/dmapool.h:18:4: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/dmapool.h:31:7: warning: 'struct device' declared inside parameter list size_t size, size_t align, size_t allocation); ^ drivers/dma/xilinx/xilinx_vdma.c: In function 'xilinx_vdma_alloc_chan_resources': drivers/dma/xilinx/xilinx_vdma.c:501:20: warning: passing argument 2 of 'dma_pool_create' from incompatible pointer type chan->desc_pool = dma_pool_create("xilinx_vdma_desc_pool", ^ In file included from drivers/dma/xilinx/xilinx_vdma.c:26:0: include/linux/dmapool.h:17:18: note: expected 'struct device *' but argument is of type 'struct device *' struct dma_pool *dma_pool_create(const char *name, struct device *dev, ^
Quoted 5 lines
Presumable caused by the include order change in commit
937abe88aea3("dmaengine: xilinx-dma: move header file to common location").I guess that
dmapool.hneeds a "struct device;" line near the top.
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.