mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 00:56:49 +07:00
rocker: Use logical operators on booleans
Silences various sparse warnings Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Scott Feldman <sfeldma@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e75605822e
commit
51ace887a0
@ -2404,17 +2404,17 @@ static int rocker_flow_tbl_bridge(struct rocker_port *rocker_port,
|
|||||||
}
|
}
|
||||||
|
|
||||||
priority = ROCKER_PRIORITY_UNKNOWN;
|
priority = ROCKER_PRIORITY_UNKNOWN;
|
||||||
if (vlan_bridging & dflt & wild)
|
if (vlan_bridging && dflt && wild)
|
||||||
priority = ROCKER_PRIORITY_BRIDGING_VLAN_DFLT_WILD;
|
priority = ROCKER_PRIORITY_BRIDGING_VLAN_DFLT_WILD;
|
||||||
else if (vlan_bridging & dflt & !wild)
|
else if (vlan_bridging && dflt && !wild)
|
||||||
priority = ROCKER_PRIORITY_BRIDGING_VLAN_DFLT_EXACT;
|
priority = ROCKER_PRIORITY_BRIDGING_VLAN_DFLT_EXACT;
|
||||||
else if (vlan_bridging & !dflt)
|
else if (vlan_bridging && !dflt)
|
||||||
priority = ROCKER_PRIORITY_BRIDGING_VLAN;
|
priority = ROCKER_PRIORITY_BRIDGING_VLAN;
|
||||||
else if (!vlan_bridging & dflt & wild)
|
else if (!vlan_bridging && dflt && wild)
|
||||||
priority = ROCKER_PRIORITY_BRIDGING_TENANT_DFLT_WILD;
|
priority = ROCKER_PRIORITY_BRIDGING_TENANT_DFLT_WILD;
|
||||||
else if (!vlan_bridging & dflt & !wild)
|
else if (!vlan_bridging && dflt && !wild)
|
||||||
priority = ROCKER_PRIORITY_BRIDGING_TENANT_DFLT_EXACT;
|
priority = ROCKER_PRIORITY_BRIDGING_TENANT_DFLT_EXACT;
|
||||||
else if (!vlan_bridging & !dflt)
|
else if (!vlan_bridging && !dflt)
|
||||||
priority = ROCKER_PRIORITY_BRIDGING_TENANT;
|
priority = ROCKER_PRIORITY_BRIDGING_TENANT;
|
||||||
|
|
||||||
entry->key.priority = priority;
|
entry->key.priority = priority;
|
||||||
@ -3010,9 +3010,9 @@ static void rocker_port_fdb_learn_work(struct work_struct *work)
|
|||||||
bool removing = (lw->flags & ROCKER_OP_FLAG_REMOVE);
|
bool removing = (lw->flags & ROCKER_OP_FLAG_REMOVE);
|
||||||
bool learned = (lw->flags & ROCKER_OP_FLAG_LEARNED);
|
bool learned = (lw->flags & ROCKER_OP_FLAG_LEARNED);
|
||||||
|
|
||||||
if (learned & removing)
|
if (learned && removing)
|
||||||
br_fdb_external_learn_del(lw->dev, lw->addr, lw->vid);
|
br_fdb_external_learn_del(lw->dev, lw->addr, lw->vid);
|
||||||
else if (learned & !removing)
|
else if (learned && !removing)
|
||||||
br_fdb_external_learn_add(lw->dev, lw->addr, lw->vid);
|
br_fdb_external_learn_add(lw->dev, lw->addr, lw->vid);
|
||||||
|
|
||||||
kfree(work);
|
kfree(work);
|
||||||
|
Loading…
Reference in New Issue
Block a user