Skip to content

Commit 3934788

Browse files
JoePerchesdavem330
authored andcommitted
net: tcp_input: Neaten DBGUNDO
Move the #ifdef into the static void function so that the use of DBGUNDO is validated when FASTRETRANS_DEBUG <= 1. Remove the now unnecessary #else and #define DBGUNDO. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2bd6bf0 commit 3934788

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

net/ipv4/tcp_input.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2333,9 +2333,9 @@ static bool tcp_any_retrans_done(const struct sock *sk)
23332333
return false;
23342334
}
23352335

2336-
#if FASTRETRANS_DEBUG > 1
23372336
static void DBGUNDO(struct sock *sk, const char *msg)
23382337
{
2338+
#if FASTRETRANS_DEBUG > 1
23392339
struct tcp_sock *tp = tcp_sk(sk);
23402340
struct inet_sock *inet = inet_sk(sk);
23412341

@@ -2357,10 +2357,8 @@ static void DBGUNDO(struct sock *sk, const char *msg)
23572357
tp->packets_out);
23582358
}
23592359
#endif
2360-
}
2361-
#else
2362-
#define DBGUNDO(x...) do { } while (0)
23632360
#endif
2361+
}
23642362

23652363
static void tcp_undo_cwnd_reduction(struct sock *sk, bool unmark_loss)
23662364
{

0 commit comments

Comments
 (0)