]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: fix u64 division
authorNikolay Aleksandrov <nikolay@redhat.com>
Thu, 23 Jan 2014 22:43:43 +0000 (23:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Jan 2014 00:10:24 +0000 (16:10 -0800)
commit77c4e2a7f108b9514f14719976fe039c988afb76
tree3c458ee6d99ef77af54bbb4a4b556f533e67aa3f
parent8f84f2e036efa8d26011021de5d30a0009bb22e2
bonding: fix u64 division

After the option conversion downdelay and updelay divide a u64
and on a 32 bit this causes the following errors:
ERROR: "__udivdi3" [drivers/net/bonding/bonding.ko] undefined!
ERROR: "__umoddi3" [drivers/net/bonding/bonding.ko] undefined!

Fix it by using a normal int instead because newval->value is capped
at INT_MAX by the way the option is defined.

Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_options.c