diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-03-28 22:09:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-29 08:04:51 +0300 |
commit | 64014fe67b0aafa129d80266fce58b60783d5c91 (patch) | |
tree | 092bf810f5fc15dcbd328406c00a369016e6f89d /drivers/net/dsa/mv88e6xxx | |
parent | 382ed72480e122421d759eb986690f04041d34bc (diff) | |
download | linux-64014fe67b0aafa129d80266fce58b60783d5c91.tar.xz |
net: dsa: mv88e6xxx: unconditionally set ATU trunk
Set the trunk member of the mv88e6xxx_atu_entry structure regardless its
value, so that uninitialized structures gets the correct boolean value.
Note that no mainline code is affected by the current behavior.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/mv88e6xxx')
-rw-r--r-- | drivers/net/dsa/mv88e6xxx/global1_atu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/dsa/mv88e6xxx/global1_atu.c b/drivers/net/dsa/mv88e6xxx/global1_atu.c index 120b7f41a735..492e00dea3ce 100644 --- a/drivers/net/dsa/mv88e6xxx/global1_atu.c +++ b/drivers/net/dsa/mv88e6xxx/global1_atu.c @@ -121,9 +121,7 @@ static int mv88e6xxx_g1_atu_data_read(struct mv88e6xxx_chip *chip, entry->state = val & 0xf; if (entry->state != GLOBAL_ATU_DATA_STATE_UNUSED) { - if (val & GLOBAL_ATU_DATA_TRUNK) - entry->trunk = true; - + entry->trunk = !!(val & GLOBAL_ATU_DATA_TRUNK); entry->portvec = (val >> 4) & mv88e6xxx_port_mask(chip); } |