lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 11 Mar 2020 02:20:50 +0800
From:   DENG Qingfang <dqfext@...il.com>
To:     netdev@...r.kernel.org
Cc:     davem@...emloft.net
Subject: [PATCH] net: dsa: mt7530: fix macro MIRROR_PORT

The inner pair of parentheses should be around the variable x
Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")

Signed-off-by: DENG Qingfang <dqfext@...il.com>
---
 drivers/net/dsa/mt7530.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
index 5e6c778..b7cfb3d 100644
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -37,7 +37,7 @@ enum {
 #define  CPU_PORT(x)			((x) << 4)
 #define  CPU_MASK			(0xf << 4)
 #define  MIRROR_EN			BIT(3)
-#define  MIRROR_PORT(x)			((x & 0x7))
+#define  MIRROR_PORT(x)			((x) & 0x7)
 #define  MIRROR_MASK			0x7
 
 /* Registers for address table access */
-- 
2.25.1

Powered by blists - more mailing lists