mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
net: Remove casts to same type
Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force and __user. @@ type T; T *p; @@ - (T *)p + p Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
29a6b6c060
commit
e3192690a3
14 changed files with 32 additions and 36 deletions
|
@ -54,7 +54,7 @@ struct tipc_sock {
|
|||
};
|
||||
|
||||
#define tipc_sk(sk) ((struct tipc_sock *)(sk))
|
||||
#define tipc_sk_port(sk) ((struct tipc_port *)(tipc_sk(sk)->p))
|
||||
#define tipc_sk_port(sk) (tipc_sk(sk)->p)
|
||||
|
||||
#define tipc_rx_ready(sock) (!skb_queue_empty(&sock->sk->sk_receive_queue) || \
|
||||
(sock->state == SS_DISCONNECTING))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue