Skip to content

Commit 193d357

Browse files
Alexey Dobriyandavem330
authored andcommitted
net: spread "enum sock_flags"
Some ints are "enum sock_flags" in fact. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d6547f2 commit 193d357

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/net/sock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2512,7 +2512,7 @@ static inline bool sk_listener(const struct sock *sk)
25122512
return (1 << sk->sk_state) & (TCPF_LISTEN | TCPF_NEW_SYN_RECV);
25132513
}
25142514

2515-
void sock_enable_timestamp(struct sock *sk, int flag);
2515+
void sock_enable_timestamp(struct sock *sk, enum sock_flags flag);
25162516
int sock_recv_errqueue(struct sock *sk, struct msghdr *msg, int len, int level,
25172517
int type);
25182518

net/core/sock.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,8 @@ static int sock_getbindtodevice(struct sock *sk, char __user *optval,
687687
return ret;
688688
}
689689

690-
static inline void sock_valbool_flag(struct sock *sk, int bit, int valbool)
690+
static inline void sock_valbool_flag(struct sock *sk, enum sock_flags bit,
691+
int valbool)
691692
{
692693
if (valbool)
693694
sock_set_flag(sk, bit);
@@ -3033,7 +3034,7 @@ int sock_gettstamp(struct socket *sock, void __user *userstamp,
30333034
}
30343035
EXPORT_SYMBOL(sock_gettstamp);
30353036

3036-
void sock_enable_timestamp(struct sock *sk, int flag)
3037+
void sock_enable_timestamp(struct sock *sk, enum sock_flags flag)
30373038
{
30383039
if (!sock_flag(sk, flag)) {
30393040
unsigned long previous_flags = sk->sk_flags;

0 commit comments

Comments
 (0)