Skip to content

Commit

Permalink
tcp_metrics: Remove the unused return code from tcp_metrics_flush_all
Browse files Browse the repository at this point in the history
tcp_metrics_flush_all always returns 0.  Remove the unnecessary return code.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
ebiederm authored and davem330 committed Mar 13, 2015
1 parent 849e8a0 commit 8a4bff7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/ipv4/tcp_metrics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ static int tcp_metrics_nl_cmd_get(struct sk_buff *skb, struct genl_info *info)

#define deref_genl(p) rcu_dereference_protected(p, lockdep_genl_is_held())

static int tcp_metrics_flush_all(struct net *net)
static void tcp_metrics_flush_all(struct net *net)
{
unsigned int max_rows = 1U << net->ipv4.tcp_metrics_hash_log;
struct tcpm_hash_bucket *hb = net->ipv4.tcp_metrics_hash;
Expand All @@ -1064,7 +1064,6 @@ static int tcp_metrics_flush_all(struct net *net)
tm = next;
}
}
return 0;
}

static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info)
Expand All @@ -1081,8 +1080,10 @@ static int tcp_metrics_nl_cmd_del(struct sk_buff *skb, struct genl_info *info)
ret = parse_nl_addr(info, &daddr, &hash, 1);
if (ret < 0)
return ret;
if (ret > 0)
return tcp_metrics_flush_all(net);
if (ret > 0) {
tcp_metrics_flush_all(net);
return 0;
}
ret = parse_nl_saddr(info, &saddr);
if (ret < 0)
src = false;
Expand Down

0 comments on commit 8a4bff7

Please sign in to comment.