projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12d4309
)
bonding: Simplify __get_duplex function.
author
Mahesh Bandewar
<
[email protected]
>
Sat, 31 Oct 2015 19:45:00 +0000
(12:45 -0700)
committer
David S. Miller
<
[email protected]
>
Tue, 3 Nov 2015 03:52:24 +0000
(22:52 -0500)
Eliminate 'else' clause by simply initializing variable
Signed-off-by: Mahesh Bandewar <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/bonding/bond_3ad.c
patch
|
blob
|
history
diff --git
a/drivers/net/bonding/bond_3ad.c
b/drivers/net/bonding/bond_3ad.c
index 3c45358844eb94bc8d44c3934e0a5689b9adf994..3a17fd207ec6ccdfcd0f9d132e1f7779db2fc651 100644
(file)
--- a/
drivers/net/bonding/bond_3ad.c
+++ b/
drivers/net/bonding/bond_3ad.c
@@
-327,14
+327,12
@@
static u16 __get_link_speed(struct port *port)
static u8 __get_duplex(struct port *port)
{
struct slave *slave = port->slave;
- u8 retval;
+ u8 retval
= 0x0
;
/* handling a special case: when the configuration starts with
* link down, it sets the duplex to 0.
*/
- if (slave->link != BOND_LINK_UP) {
- retval = 0x0;
- } else {
+ if (slave->link == BOND_LINK_UP) {
switch (slave->duplex) {
case DUPLEX_FULL:
retval = 0x1;