RE: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-08 Thread David Laight
From: Andrew Lunn > Sent: 07 November 2020 22:33 > > On Sat, Nov 07, 2020 at 09:39:42AM -0800, Joe Perches wrote: > > On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > > > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > > > It is good to remember that there are multiple readers of source > > >

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-07 Thread Andrew Lunn
On Sat, Nov 07, 2020 at 09:39:42AM -0800, Joe Perches wrote: > On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > > It is good to remember that there are multiple readers of source > > > > files. There is the compiler which generates code from

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-07 Thread Joe Perches
On Sat, 2020-11-07 at 20:54 +0800, Alex Shi wrote: > 在 2020/11/7 上午12:39, Florian Fainelli 写道: > > > It is good to remember that there are multiple readers of source > > > files. There is the compiler which generates code from it, and there > > > is the human trying to understand what is going on,

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-07 Thread Alex Shi
在 2020/11/7 上午12:39, Florian Fainelli 写道: >> Hi Alex >> >> It is good to remember that there are multiple readers of source >> files. There is the compiler which generates code from it, and there >> is the human trying to understand what is going on, what the hardware >> can do, how we could

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread Florian Fainelli
On 11/6/2020 6:18 AM, Andrew Lunn wrote: > On Fri, Nov 06, 2020 at 01:37:30PM +0800, Alex Shi wrote: >> 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 >>

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread Andrew Lunn
On Fri, Nov 06, 2020 at 01:37:30PM +0800, Alex Shi wrote: > 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

RE: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread David Laight
From: Joe Perches > Sent: 06 November 2020 06:36 > > 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. Indeed. One 'solution' is to move the

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread Alex Shi
在 2020/11/6 下午4:52, Joe Perches 写道: > 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. >>> >>>

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread Joe Perches
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

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-06 Thread Alex Shi
在 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

Re: [PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-05 Thread 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

[PATCH] net/dsa: remove unused macros to tame gcc warning

2020-11-05 Thread Alex Shi
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: