Void pointers don't need to be cast to other pointer types.
Semantic patch used:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
*((T *)e)
|
((T *)x) [...]
|
((T *)x)->f
|
- (T *)
e
)
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
void rtw_use_tkipkey_handler23a(void *FunctionContext)
{
- struct rtw_adapter *padapter = (struct rtw_adapter *)FunctionContext;
+ struct rtw_adapter *padapter = FunctionContext;
RT_TRACE(_module_rtl871x_security_c_, _drv_err_,
"^^^%s ^^^\n", __func__);