linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] net: dsa: qca8k: fix warning in LAG feature
@ 2021-11-23 15:44 Ansuel Smith
  2021-11-23 19:07 ` Florian Fainelli
  2021-11-25  1:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Ansuel Smith @ 2021-11-23 15:44 UTC (permalink / raw)
  To: Andrew Lunn, Vivien Didelot, Florian Fainelli, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, netdev, linux-kernel
  Cc: Ansuel Smith, kernel test robot

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 <lkp@intel.com>
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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: fix warning in LAG feature
  2021-11-23 15:44 [net-next PATCH] net: dsa: qca8k: fix warning in LAG feature Ansuel Smith
@ 2021-11-23 19:07 ` Florian Fainelli
  2021-11-25  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2021-11-23 19:07 UTC (permalink / raw)
  To: Ansuel Smith, Andrew Lunn, Vivien Didelot, Vladimir Oltean,
	David S. Miller, Jakub Kicinski, netdev, linux-kernel
  Cc: kernel test robot

On 11/23/21 7:44 AM, Ansuel Smith wrote:
> 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 <lkp@intel.com>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes: def975307c01 ("net: dsa: qca8k: add LAG support")
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [net-next PATCH] net: dsa: qca8k: fix warning in LAG feature
  2021-11-23 15:44 [net-next PATCH] net: dsa: qca8k: fix warning in LAG feature Ansuel Smith
  2021-11-23 19:07 ` Florian Fainelli
@ 2021-11-25  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-25  1:40 UTC (permalink / raw)
  To: Ansuel Smith
  Cc: andrew, vivien.didelot, f.fainelli, olteanv, davem, kuba, netdev,
	linux-kernel, lkp

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 23 Nov 2021 16:44:46 +0100 you wrote:
> 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 <lkp@intel.com>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] net: dsa: qca8k: fix warning in LAG feature
    https://git.kernel.org/netdev/net-next/c/0898ca67b86e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-11-25  1:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 15:44 [net-next PATCH] net: dsa: qca8k: fix warning in LAG feature Ansuel Smith
2021-11-23 19:07 ` Florian Fainelli
2021-11-25  1:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).