Done with following coccinelle patch
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: Harsha Sharma
---
Changes in v2:
-Remove unnecessary parentheses
-Remove one more useless cast
drivers/gpu/drm/amd/powerplay
Am 13.10.2017 um 19:33 schrieb Harsha Sharma:
Done with following coccinelle patch
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x)[...]
|
((T*)x)->f
|
- (T*)
e
)
Signed-off-by: Harsha Sharma
Reviewed-by: Christian König
---
Changes in v2:
-Remove
> @@ -3400,7 +3400,7 @@ static int smu7_read_sensor(struct pp_hwmgr *hwmgr, int
> idx,
> static int smu7_find_dpm_states_clocks_in_dpm_table(struct pp_hwmgr *hwmgr,
> const void *input)
> {
> const struct phm_set_power_state_input *states =
> - (const struct phm_set_po