From patchwork Fri Nov 6 05:37:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Shi X-Patchwork-Id: 11886039 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5BA1C388F2 for ; Fri, 6 Nov 2020 05:37:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A5EC208FE for ; Fri, 6 Nov 2020 05:37:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726075AbgKFFhi (ORCPT ); Fri, 6 Nov 2020 00:37:38 -0500 Received: from out30-45.freemail.mail.aliyun.com ([115.124.30.45]:48070 "EHLO out30-45.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbgKFFhi (ORCPT ); Fri, 6 Nov 2020 00:37:38 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0UEOe0vL_1604641052; Received: from aliy80.localdomain(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UEOe0vL_1604641052) by smtp.aliyun-inc.com(127.0.0.1); Fri, 06 Nov 2020 13:37:32 +0800 From: Alex Shi To: andrew@lunn.ch Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/dsa: remove unused macros to tame gcc warning Date: Fri, 6 Nov 2020 13:37:30 +0800 Message-Id: <1604641050-6004-1-git-send-email-alex.shi@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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 Cc: Andrew Lunn Cc: Vivien Didelot Cc: Florian Fainelli Cc: Vladimir Oltean Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.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) || \