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  linux-cve-announce  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]
Message-Id: <1604641050-6004-1-git-send-email-alex.shi@linux.alibaba.com>
Date:   Fri,  6 Nov 2020 13:37:30 +0800
From:   Alex Shi <alex.shi@...ux.alibaba.com>
To:     andrew@...n.ch
Cc:     Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vladimir Oltean <olteanv@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH] net/dsa: remove unused macros to tame gcc warning

There are some macros unused, they causes much gcc warnings. Let's
remove them to tame gcc.

net/dsa/tag_brcm.c:51:0: warning: macro "BRCM_EG_RC_SWITCH" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:53:0: warning: macro "BRCM_EG_RC_MIRROR" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:55:0: warning: macro "BRCM_EG_TC_MASK" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:35:0: warning: macro "BRCM_IG_TS_SHIFT" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:46:0: warning: macro "BRCM_EG_RC_MASK" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:49:0: warning: macro "BRCM_EG_RC_PROT_SNOOP" is not
used [-Wunused-macros]
net/dsa/tag_brcm.c:34:0: warning: macro "BRCM_IG_TE_MASK" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:43:0: warning: macro "BRCM_EG_CID_MASK" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:50:0: warning: macro "BRCM_EG_RC_PROT_TERM" is not
used [-Wunused-macros]
net/dsa/tag_brcm.c:54:0: warning: macro "BRCM_EG_TC_SHIFT" is not used
[-Wunused-macros]
net/dsa/tag_brcm.c:52:0: warning: macro "BRCM_EG_RC_MAC_LEARN" is not
used [-Wunused-macros]
net/dsa/tag_brcm.c:48:0: warning: macro "BRCM_EG_RC_EXCEPTION" is not
used [-Wunused-macros]

Signed-off-by: Alex Shi <alex.shi@...ux.alibaba.com>
Cc: Andrew Lunn <andrew@...n.ch> 
Cc: Vivien Didelot <vivien.didelot@...il.com> 
Cc: Florian Fainelli <f.fainelli@...il.com> 
Cc: Vladimir Oltean <olteanv@...il.com> 
Cc: "David S. Miller" <davem@...emloft.net> 
Cc: Jakub Kicinski <kuba@...nel.org> 
Cc: netdev@...r.kernel.org 
Cc: linux-kernel@...r.kernel.org 
---
 net/dsa/tag_brcm.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/net/dsa/tag_brcm.c b/net/dsa/tag_brcm.c
index e934dace3922..ce23b5d4c6b8 100644
--- a/net/dsa/tag_brcm.c
+++ b/net/dsa/tag_brcm.c
@@ -30,29 +30,14 @@
 /* 1st byte in the tag */
 #define BRCM_IG_TC_SHIFT	2
 #define BRCM_IG_TC_MASK		0x7
-/* 2nd byte in the tag */
-#define BRCM_IG_TE_MASK		0x3
-#define BRCM_IG_TS_SHIFT	7
 /* 3rd byte in the tag */
 #define BRCM_IG_DSTMAP2_MASK	1
 #define BRCM_IG_DSTMAP1_MASK	0xff
 
 /* Egress fields */
 
-/* 2nd byte in the tag */
-#define BRCM_EG_CID_MASK	0xff
-
 /* 3rd byte in the tag */
-#define BRCM_EG_RC_MASK		0xff
 #define  BRCM_EG_RC_RSVD	(3 << 6)
-#define  BRCM_EG_RC_EXCEPTION	(1 << 5)
-#define  BRCM_EG_RC_PROT_SNOOP	(1 << 4)
-#define  BRCM_EG_RC_PROT_TERM	(1 << 3)
-#define  BRCM_EG_RC_SWITCH	(1 << 2)
-#define  BRCM_EG_RC_MAC_LEARN	(1 << 1)
-#define  BRCM_EG_RC_MIRROR	(1 << 0)
-#define BRCM_EG_TC_SHIFT	5
-#define BRCM_EG_TC_MASK		0x7
 #define BRCM_EG_PID_MASK	0x1f
 
 #if IS_ENABLED(CONFIG_NET_DSA_TAG_BRCM) || \
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ