Skip to content

Commit

Permalink
net: spread "enum sock_flags"
Browse files Browse the repository at this point in the history
Some ints are "enum sock_flags" in fact.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Oct 4, 2019
1 parent d6547f2 commit 193d357
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -2512,7 +2512,7 @@ static inline bool sk_listener(const struct sock *sk)
return (1 << sk->sk_state) & (TCPF_LISTEN | TCPF_NEW_SYN_RECV);
}

void sock_enable_timestamp(struct sock *sk, int flag);
void sock_enable_timestamp(struct sock *sk, enum sock_flags flag);
int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, int level,
int type);

Expand Down
5 changes: 3 additions & 2 deletions net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,8 @@ static int sock_getbindtodevice(struct sock *sk, char __user *optval,
return ret;
}

static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool)
static inline void sock_valbool_flag(struct sock *sk, enum sock_flags bit,
int valbool)
{
if (valbool)
sock_set_flag(sk, bit);
Expand Down Expand Up @@ -3033,7 +3034,7 @@ int sock_gettstamp(struct socket *sock, void __user *userstamp,
}
EXPORT_SYMBOL(sock_gettstamp);

void sock_enable_timestamp(struct sock *sk, int flag)
void sock_enable_timestamp(struct sock *sk, enum sock_flags flag)
{
if (!sock_flag(sk, flag)) {
unsigned long previous_flags = sk->sk_flags;
Expand Down

0 comments on commit 193d357

Please sign in to comment.