git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
net: use reciprocal_scale() helper
[pandora-kernel.git]
/
net
/
netfilter
/
xt_hashlimit.c
diff --git
a/net/netfilter/xt_hashlimit.c
b/net/netfilter/xt_hashlimit.c
index
47dc683
..
52eb3e0
100644
(file)
--- a/
net/netfilter/xt_hashlimit.c
+++ b/
net/netfilter/xt_hashlimit.c
@@
-135,7
+135,7
@@
hash_dst(const struct xt_hashlimit_htable *ht, const struct dsthash_dst *dst)
* give results between [0 and cfg.size-1] and same hash distribution,
* but using a multiply, less expensive than a divide
*/
- return
((u64)hash * ht->cfg.size) >> 32
;
+ return
reciprocal_scale(hash, ht->cfg.size)
;
}
static struct dsthash_ent *