mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw: Remove unnecessary cast when calling dma_memory_read()
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)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
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)
|
||||
)
|
||||
Reference in New Issue
Block a user