linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Shi <alex.shi@linux.alibaba.com>
To: Joe Perches <joe@perches.com>, andrew@lunn.ch
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/dsa: remove unused macros to tame gcc warning
Date: Fri, 6 Nov 2020 16:28:43 +0800	[thread overview]
Message-ID: <8e0fac45-9107-cdfe-de9e-ccf3abd416a4@linux.alibaba.com> (raw)
In-Reply-To: <71dc38c1646980840fb83d82fc588501af72e05f.camel@perches.com>



在 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
>  
> 

  reply	other threads:[~2020-11-06  8:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  5:37 [PATCH] net/dsa: remove unused macros to tame gcc warning Alex Shi
2020-11-06  6:36 ` Joe Perches
2020-11-06  8:28   ` Alex Shi [this message]
2020-11-06  8:52     ` Joe Perches
2020-11-06  8:57       ` Alex Shi
2020-11-06  9:24   ` David Laight
2020-11-06 14:18 ` Andrew Lunn
2020-11-06 16:39   ` Florian Fainelli
2020-11-07 12:54     ` Alex Shi
2020-11-07 17:39       ` Joe Perches
2020-11-07 22:33         ` Andrew Lunn
2020-11-08 12:39           ` David Laight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e0fac45-9107-cdfe-de9e-ccf3abd416a4@linux.alibaba.com \
    --to=alex.shi@linux.alibaba.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=joe@perches.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).