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>
This commit is contained in:

committed by
David S. Miller

parent
690e36e726
commit
8fc54f6891
@@ -229,7 +229,7 @@ begin:
|
||||
}
|
||||
} else if (score == hiscore && reuseport) {
|
||||
matches++;
|
||||
if (((u64)phash * matches) >> 32 == 0)
|
||||
if (reciprocal_scale(phash, matches) == 0)
|
||||
result = sk;
|
||||
phash = next_pseudo_random32(phash);
|
||||
}
|
||||
|
Reference in New Issue
Block a user