Void pointers need not 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>
struct xlr_net_priv *priv;
u32 port, length;
unsigned char *addr;
- struct xlr_adapter *adapter = (struct xlr_adapter *)arg;
+ struct xlr_adapter *adapter = arg;
length = (msg->msg0 >> 40) & 0x3fff;
if (length == 0) {