* finding your own dead "CONFIG_" variables
@ 2007-05-03 8:19 Robert P. J. Day
2007-05-03 9:37 ` Satyam Sharma
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2007-05-03 8:19 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: netdev
while there's still a pile of possible dead CONFIG_ variables under
the fs/ and drivers/ directories i haven't posted yet, you don't need
to wait for me to generate them. take a minute and run the script
yourself:
http://fsdev.net/wiki/index.php?title=Dead_CONFIG_variables
a couple of examples:
$ ../dead_config.sh net/wanrouter
========== WANPIPE_MULTPPP ==========
net/wanrouter/wanmain.c:#ifdef CONFIG_WANPIPE_MULTPPP
net/wanrouter/wanmain.c:#ifdef CONFIG_WANPIPE_MULTPPP
net/wanrouter/wanmain.c:#ifdef CONFIG_WANPIPE_MULTPPP
$ ../dead_config.sh drivers/net/wireless
========== BCM947XX ==========
drivers/net/wireless/bcm43xx/bcm43xx_dma.c:663:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.h:36:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:64:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:145:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:789:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:799:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:1228:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:1390://FIXME: Do we _really_ want #ifndef CONFIG_BCM947XX here?
drivers/net/wireless/bcm43xx/bcm43xx_main.c:1392:#ifndef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:2143:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:2155:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:2648:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx_main.c:4147:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx.h:661:#ifdef CONFIG_BCM947XX
drivers/net/wireless/bcm43xx/bcm43xx.h:792:#ifdef CONFIG_BCM947XX
$
go wild.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: finding your own dead "CONFIG_" variables
2007-05-03 8:19 finding your own dead "CONFIG_" variables Robert P. J. Day
@ 2007-05-03 9:37 ` Satyam Sharma
2007-05-03 9:49 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Satyam Sharma @ 2007-05-03 9:37 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Linux Kernel Mailing List, netdev
> http://fsdev.net/wiki/index.php?title=Dead_CONFIG_variables
> kcfiles=$(find . -name "Kconfig*")
Suggest: configfiles=$(find . -name 'Kconfig*' -or -name '*defconfig*')
Some CONFIG_ options exist that are not declared anywhere in the
Kconfig files but defined directly in the arch/.../*defconfig* files.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: finding your own dead "CONFIG_" variables
2007-05-03 9:37 ` Satyam Sharma
@ 2007-05-03 9:49 ` Robert P. J. Day
2007-05-03 10:02 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Robert P. J. Day @ 2007-05-03 9:49 UTC (permalink / raw)
To: Satyam Sharma; +Cc: Linux Kernel Mailing List, netdev
On Thu, 3 May 2007, Satyam Sharma wrote:
> > http://fsdev.net/wiki/index.php?title=Dead_CONFIG_variables
>
> > kcfiles=$(find . -name "Kconfig*")
>
> Suggest: configfiles=$(find . -name 'Kconfig*' -or -name '*defconfig*')
>
> Some CONFIG_ options exist that are not declared anywhere in the
> Kconfig files but defined directly in the arch/.../*defconfig*
> files.
it's my understanding that entries in any defconfig files are
*automatically* pruned at some point once a CONFIG_ variable no longer
exists in any Kconfig file, so i'm not going to be touching those
files. also, adding that extra check wouldn't add anything useful to
the output.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: finding your own dead "CONFIG_" variables
2007-05-03 9:49 ` Robert P. J. Day
@ 2007-05-03 10:02 ` Arnd Bergmann
2007-05-03 10:19 ` Robert P. J. Day
0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2007-05-03 10:02 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: Satyam Sharma, Linux Kernel Mailing List, netdev
On Thursday 03 May 2007, Robert P. J. Day wrote:
> > Suggest: configfiles=$(find . -name 'Kconfig*' -or -name '*defconfig*')
> >
> > Some CONFIG_ options exist that are not declared anywhere in the
> > Kconfig files but defined directly in the arch/.../*defconfig*
> > files.
>
> it's my understanding that entries in any defconfig files are
> *automatically* pruned at some point once a CONFIG_ variable no longer
> exists in any Kconfig file, so i'm not going to be touching those
> files. also, adding that extra check wouldn't add anything useful to
> the output.
An interesting category would be a symbol that is
- used in a source file
- defined in an old defconfig
- not present in any Kconfig* file
If any of these exist, I would consider them _worse_ than the ones
found by your initial script, because some functionality that once
was there has been recently removed.
Arnd <><
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: finding your own dead "CONFIG_" variables
2007-05-03 10:02 ` Arnd Bergmann
@ 2007-05-03 10:19 ` Robert P. J. Day
0 siblings, 0 replies; 5+ messages in thread
From: Robert P. J. Day @ 2007-05-03 10:19 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Satyam Sharma, Linux Kernel Mailing List, netdev
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1831 bytes --]
On Thu, 3 May 2007, Arnd Bergmann wrote:
> On Thursday 03 May 2007, Robert P. J. Day wrote:
> > > Suggest: configfiles=$(find . -name 'Kconfig*' -or -name '*defconfig*')
> > >
> > > Some CONFIG_ options exist that are not declared anywhere in the
> > > Kconfig files but defined directly in the arch/.../*defconfig*
> > > files.
> >
> > it's my understanding that entries in any defconfig files are
> > *automatically* pruned at some point once a CONFIG_ variable no longer
> > exists in any Kconfig file, so i'm not going to be touching those
> > files. also, adding that extra check wouldn't add anything useful to
> > the output.
>
>
> An interesting category would be a symbol that is
>
> - used in a source file
> - defined in an old defconfig
> - not present in any Kconfig* file
>
> If any of these exist, I would consider them _worse_ than the ones
> found by your initial script, because some functionality that once
> was there has been recently removed.
hmmmmmm ... i see your point now -- not present in any Kconfig file
but still being selected by a defconfig file that might still be
affecting the eventual build. that's an easy enough change to make
but, as i've mentioned before, this output could be reduced
substantially if developers stopped using CONFIG_ prefixed macro names
for their own non-Kconfig variables (*cough* MTD *cough* :-).
but, again, some of that issue might disappear if those defconfig
files were auto-regenerated on a timely basis (if that is, in fact,
how they're kept up to date).
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://fsdev.net/wiki/index.php?title=Main_Page
========================================================================
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-03 10:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-03 8:19 finding your own dead "CONFIG_" variables Robert P. J. Day
2007-05-03 9:37 ` Satyam Sharma
2007-05-03 9:49 ` Robert P. J. Day
2007-05-03 10:02 ` Arnd Bergmann
2007-05-03 10:19 ` Robert P. J. Day
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).