Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1100706pxb; Fri, 6 Nov 2020 00:30:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIOZMk+lr6dApFTXzOGR3uuhEvQX3NwyXHCdxwcyE26HSebqnCS5OCfeaKqe38tdt792hT X-Received: by 2002:a05:6402:170e:: with SMTP id y14mr851120edu.115.1604651453146; Fri, 06 Nov 2020 00:30:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604651453; cv=none; d=google.com; s=arc-20160816; b=hIzMSfc6ufMSlf8+rYkpto6aneenPdzNPqcjHWrzAvcHfJ7j5YeEX6aJ0Karvv7zad meZELQQLVi3X2lDoubVDtVPxc91dx47pWHdgYdVlJBpbiHxILNV+Qx3NOQ3g6ySb9FOO DHLniLPsc7v5T0mmWoY8eD41lts9OZCKTiju+Q6wxUQ5W7fWYcfVhalM66C2aLdw5D9T wSl6DqtZBVBDHbNGmKhNMLks4z4Qp1B8RF3o9EoTeeYfcpobiI9JWPtHu3KokI6hkcGk gLm4iDaEZo0MgU2TNoYm/2E5g+/SJx2bkyULf2jBHipFZcDY9Ax/wxrudfjD+BonurS3 RlTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=fumhO3igkwouBIuAeCK1MLNKvYXPANLlBUursQ/gbdE=; b=ETXX8fEnWPiea4gWJRMN8z4v8553bI9lV9rVyjxXC+vy/oAowHB4wE5abFBkIEEm66 h1wJ4Y9bWIDT18dkS3zzpsAnlGavAQi+aNeItGb/ZK5oTBXLPsJzYShbNmov4M+uvB7J fs8kLT+3jauU49kGBbq9z0D9GEdxFGgnBD3Tfre6MMENJ1ZqesPYplv/OxeIWZzgg0Ti sN5833LG9CVCmWaK0WLf0IeObCTellNtJY/4Gu0Az33TL+WPNBoHh5d+dHoqozXcLaAj omkHHB6A3GpCcaUpCPFqUy1vJHMGgZ1hM8wwHEbvA3Ux7a7Ft3cdJPJl54+t0wuGohWw ZUmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gn11si324715ejc.638.2020.11.06.00.30.28; Fri, 06 Nov 2020 00:30:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726630AbgKFI25 (ORCPT + 99 others); Fri, 6 Nov 2020 03:28:57 -0500 Received: from out4436.biz.mail.alibaba.com ([47.88.44.36]:35903 "EHLO out4436.biz.mail.alibaba.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgKFI25 (ORCPT ); Fri, 6 Nov 2020 03:28:57 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R151e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UEPEfCA_1604651334; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0UEPEfCA_1604651334) by smtp.aliyun-inc.com(127.0.0.1); Fri, 06 Nov 2020 16:28:54 +0800 Subject: Re: [PATCH] net/dsa: remove unused macros to tame gcc warning To: Joe Perches , andrew@lunn.ch Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1604641050-6004-1-git-send-email-alex.shi@linux.alibaba.com> <71dc38c1646980840fb83d82fc588501af72e05f.camel@perches.com> From: Alex Shi Message-ID: <8e0fac45-9107-cdfe-de9e-ccf3abd416a4@linux.alibaba.com> Date: Fri, 6 Nov 2020 16:28:43 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <71dc38c1646980840fb83d82fc588501af72e05f.camel@perches.com> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/11/6 ????2:36, Joe Perches ะด??: > On Fri, 2020-11-06 at 13:37 +0800, Alex Shi wrote: >> There are some macros unused, they causes much gcc warnings. Let's >> remove them to tame gcc. > > I believe these to be essentially poor warnings. > > Aren't these warnings generated only when adding W=2 to the make > command line? > > Perhaps it's better to move the warning to level 3 > --- > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > index 95e4cdb94fe9..5c3c220ddb32 100644 > --- a/scripts/Makefile.extrawarn > +++ b/scripts/Makefile.extrawarn > @@ -68,7 +68,6 @@ KBUILD_CFLAGS += $(call cc-option, -Wlogical-op) > KBUILD_CFLAGS += -Wmissing-field-initializers > KBUILD_CFLAGS += -Wtype-limits > KBUILD_CFLAGS += $(call cc-option, -Wmaybe-uninitialized) > -KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) This changed too much, and impact others. May not good. :) Thanks Alex > > KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN2 > > @@ -89,6 +88,7 @@ KBUILD_CFLAGS += -Wredundant-decls > KBUILD_CFLAGS += -Wsign-compare > KBUILD_CFLAGS += -Wswitch-default > KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat) > +KBUILD_CFLAGS += $(call cc-option, -Wunused-macros) > > KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN3 > >