mirror of
https://github.com/qemu/qemu.git
synced 2025-08-02 12:45:00 +00:00

Since its introduction in commit d86a77f8ab
, dma_memory_read()
always accepted void pointer argument. Remove the unnecessary
casts.
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v4: Drop parenthesis when removing cast (Eric Blake)
24 lines
439 B
Plaintext
24 lines
439 B
Plaintext
/*
|
|
Usage:
|
|
|
|
spatch \
|
|
--macro-file scripts/cocci-macro-file.h \
|
|
--sp-file scripts/coccinelle/exec_rw_const.cocci \
|
|
--keep-comments \
|
|
--in-place \
|
|
--dir .
|
|
*/
|
|
|
|
// Remove useless cast
|
|
@@
|
|
expression E1, E2, E3, E4;
|
|
type T;
|
|
@@
|
|
(
|
|
- dma_memory_read(E1, E2, (T *)(E3), E4)
|
|
+ dma_memory_read(E1, E2, E3, E4)
|
|
|
|
|
- dma_memory_write(E1, E2, (T *)(E3), E4)
|
|
+ dma_memory_write(E1, E2, E3, E4)
|
|
)
|