]> git.proxmox.com Git - mirror_qemu.git/blame - scripts/coccinelle/exec_rw_const.cocci
hw: Remove unnecessary cast when calling dma_memory_read()
[mirror_qemu.git] / scripts / coccinelle / exec_rw_const.cocci
CommitLineData
18610bfd
PMD
1/*
2 Usage:
3
4 spatch \
5 --macro-file scripts/cocci-macro-file.h \
6 --sp-file scripts/coccinelle/exec_rw_const.cocci \
7 --keep-comments \
8 --in-place \
9 --dir .
10*/
11
12// Remove useless cast
13@@
14expression E1, E2, E3, E4;
15type T;
16@@
17(
18- dma_memory_read(E1, E2, (T *)(E3), E4)
19+ dma_memory_read(E1, E2, E3, E4)
20|
21- dma_memory_write(E1, E2, (T *)(E3), E4)
22+ dma_memory_write(E1, E2, E3, E4)
23)