diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2014-08-23 20:58:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-23 12:21:21 -0700 |
commit | 8fc54f68919298ff9689d980efb495707ef43f30 (patch) | |
tree | c8a0c89621a9e670be02764a357bb6e73ed7ab6c /net/netfilter/xt_cluster.c | |
parent | 690e36e726d00d2528bc569809048adf61550d80 (diff) |
net: use reciprocal_scale() helper
Replace open codings of (((u64) <x> * <y>) >> 32) with reciprocal_scale().
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter/xt_cluster.c')
-rw-r--r-- | net/netfilter/xt_cluster.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/xt_cluster.c b/net/netfilter/xt_cluster.c index f4af1bfafb1..96fa26b20b6 100644 --- a/net/netfilter/xt_cluster.c +++ b/net/netfilter/xt_cluster.c @@ -55,7 +55,8 @@ xt_cluster_hash(const struct nf_conn *ct, WARN_ON(1); break; } - return (((u64)hash * info->total_nodes) >> 32); + + return reciprocal_scale(hash, info->total_nodes); } static inline bool |