All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC] Centralise documentation of CONFIG_ options (and finding unused ones)
@ 2011-04-11 13:11 Graeme Russ
  2011-04-14  6:17 ` Albert ARIBAUD
  2011-04-14  9:14 ` Kumar Gala
  0 siblings, 2 replies; 7+ messages in thread
From: Graeme Russ @ 2011-04-11 13:11 UTC (permalink / raw)
  To: u-boot

Hi All,

As a bit of a lark, I ran the following shell command:

grep -r -h -o -G "#define CONFIG.*" * | \
sed 's/#define[ \t]*//' | \
sed 's/^\([A-Za-z0-9_]*\).*/\1/' | \
sort -u > README.configuration.options

I then ran the result through the following script into
README.configuration.options.counted

#!/bin/bash
INPUT=doc/README.configuration.options

#!/bin/bash
INPUT=doc/README.configuration.options

for i in `cat $INPUT`
do
	grep -rcs --exclude-dir=doc '\<'${i}'\>' * | \
	cut -d : -f 2 | \
	awk '{sum+=$1} END {printf("%d\t%s\n", sum, f);}' f=$i
done

The result? 5539 lines of pure configuration option goodness :)

Here's a little snippet:

6	CONFIG_100MHz
8	CONFIG_133MHZ_DRAM
7	CONFIG_300MHz
13	CONFIG_405
24	CONFIG_405CR
88	CONFIG_405EP
81	CONFIG_405EX

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-17 19:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 13:11 [U-Boot] [RFC] Centralise documentation of CONFIG_ options (and finding unused ones) Graeme Russ
2011-04-14  6:17 ` Albert ARIBAUD
2011-04-14  8:36   ` Graeme Russ
2011-04-14  9:14 ` Kumar Gala
2011-04-16  7:16   ` Graeme Russ
2011-04-17 13:30     ` Timur Tabi
2011-04-17 19:26       ` Graeme Russ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.