net: use reciprocal_scale() helper
[pandora-kernel.git] / net / netfilter / xt_hashlimit.c
index 47dc683..52eb3e0 100644 (file)
@@ -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 *