Commit f5280948 authored by Wang Sheng-Hui's avatar Wang Sheng-Hui Committed by David S. Miller
Browse files

bonding: use pre-defined macro in bond_mode_name instead of magic number 0

We have BOND_MODE_ROUNDROBIN pre-defined as 0, and it's the lowest
mode number.
Use it to check the arg lower bound instead of magic number 0 in
Signed-off-by: default avatarWang Sheng-Hui <>
Signed-off-by: default avatarDavid S. Miller <>
parent 9025c8e2
......@@ -273,7 +273,7 @@ const char *bond_mode_name(int mode)
[BOND_MODE_ALB] = "adaptive load balancing",
if (mode < 0 || mode > BOND_MODE_ALB)
return "unknown";
return names[mode];
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment