Skip to content
Commit 3f3ebe53 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Paolo Abeni
Browse files

net/tun: use reciprocal_scale



Use the inline function reciprocal_scale rather than open coding
the scale optimization.  Also, remove unnecessary initializations.
Resulting compiled code is unchanged (according to godbolt).

Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Reviewed-by: default avatarWillem de Bruijn <willemb@google.com>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20240126002550.169608-1-stephen@networkplumber.org


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent e8166eb2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment