Thread (3 messages) flat view 3 messages, 3 authors, 2021-11-25
STALE1737d LANDED

Landed in mainline as 0898ca67b86e on 2021-11-25.

[net-next PATCH] net: dsa: qca8k: fix warning in LAG feature

From: Ansuel Smith <ansuelsmth@gmail.com>
Date: 2021-11-23 15:45:20
Also in: lkml
Subsystem: networking drivers, networking [dsa], the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn, Vladimir Oltean, Linus Torvalds

Fix warning reported by bot.
Make sure hash is init to 0 and fix wrong logic for hash_type in
qca8k_lag_can_offload.

Reported-by: kernel test robot <redacted>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 drivers/net/dsa/qca8k.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/qca8k.c b/drivers/net/dsa/qca8k.c
index 6516df08a5d5..d04b25eca250 100644
--- a/drivers/net/dsa/qca8k.c
+++ b/drivers/net/dsa/qca8k.c
@@ -2228,7 +2228,7 @@ qca8k_lag_can_offload(struct dsa_switch *ds,
 	if (info->tx_type != NETDEV_LAG_TX_TYPE_HASH)
 		return false;
 
-	if (info->hash_type != NETDEV_LAG_HASH_L2 ||
+	if (info->hash_type != NETDEV_LAG_HASH_L2 &&
 	    info->hash_type != NETDEV_LAG_HASH_L23)
 		return false;
 
@@ -2242,8 +2242,8 @@ qca8k_lag_setup_hash(struct dsa_switch *ds,
 {
 	struct qca8k_priv *priv = ds->priv;
 	bool unique_lag = true;
+	u32 hash = 0;
 	int i, id;
-	u32 hash;
 
 	id = dsa_lag_id(ds->dst, lag);
 
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help