lkml.org 
[lkml]   [2011]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 12/21 v2] m68k: drop unused Kconfig symbols
From
Date
On Thu, 2011-10-20 at 08:54 +0200, Geert Uytterhoeven wrote:
> BTW, a few of the *_SCC symbols became orphaned, too.

Yes, MVME147_SCC, MVME162_SCC and BVME6000_SCC look unused. I missed
those because of these lines:
config SERIAL_CONSOLE
bool "Support for serial port console"
depends on [..] MVME147_SCC || [...] MVME162_SCC || BVME6000_SCC [...]

The scripts I used aren't smart enough to evaluate a second instance of
these symbols. One of the simple heuristics they used was: "mentioned a
second time in any of the Kconfig files means it is used".

I haven't yet discovered a smarter way to do this. In this case that
might be: if any other usage of the symbol in the Kconfig doesn't
"select" any other symbol it is unused (provided, of course, there's no
instance of CONFIG_$symbol in any non-Kconfig file) . But I don't know
if that will work. Moreover, this requires an actual parser of the
Kconfig syntax. I've chosen to keep things as dumb as possible, and use
as little understanding of the Kconfig syntax as possible. I still found
quite a number of unused symbols with an acceptable signal to noise
ratio. False-negatives like these are the downside.


Paul Bolle



\
 
 \ /
  Last update: 2011-10-20 13:01    [W:0.503 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site