From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no 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 96236C388F2 for ; Fri, 6 Nov 2020 08:52:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 43967208B3 for ; Fri, 6 Nov 2020 08:52:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbgKFIwS (ORCPT ); Fri, 6 Nov 2020 03:52:18 -0500 Received: from smtprelay0031.hostedemail.com ([216.40.44.31]:59746 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725868AbgKFIwS (ORCPT ); Fri, 6 Nov 2020 03:52:18 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id D6ECC837F253; Fri, 6 Nov 2020 08:52:16 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: hope57_0d0ff78272d1 X-Filterd-Recvd-Size: 2210 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA; Fri, 6 Nov 2020 08:52:15 +0000 (UTC) Message-ID: <1662b333dd72369af4c1173035d43590fbc45292.camel@perches.com> Subject: Re: [PATCH] net/dsa: remove unused macros to tame gcc warning From: Joe Perches To: Alex Shi , andrew@lunn.ch Cc: Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 06 Nov 2020 00:52:14 -0800 In-Reply-To: <8e0fac45-9107-cdfe-de9e-ccf3abd416a4@linux.alibaba.com> References: <1604641050-6004-1-git-send-email-alex.shi@linux.alibaba.com> <71dc38c1646980840fb83d82fc588501af72e05f.camel@perches.com> <8e0fac45-9107-cdfe-de9e-ccf3abd416a4@linux.alibaba.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2020-11-06 at 16:28 +0800, Alex Shi wrote: > > 在 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. :) Can you clarify what you mean?