is scripts/checkkconfigsymbols.sh actually used?

From: Reinhard Tartler
Date: Tue Jul 21 2009 - 11:50:13 EST


Hi,

(CC'ing Paolo Giarrusso, the author of scripts/checkkconfigsymbols.sh)

I'm currently looking at the output of scripts/checkkconfigsymbols.sh to
find out that on 2.6.30, it reports about 760 unreferenced symbols
used. I have the impression that the variability implemented in the Linux
source base is diverging heavily from the variability described in Linux
Kconfig.

Just with looking over the list, I think I've identified 2 obvious typos
where the configuration option was misspelled:

The first one is CONFIG_CPUMASK_OFFSTACK:

diff --git a/include/linux/irq.h b/include/linux/irq.h
index b7cbeed..6983591 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -471,14 +471,14 @@ static inline bool init_alloc_desc_masks(struct irq_desc *desc, int cpu,
* @new_desc: pointer to new irq_desc struct
*
* Insures affinity and pending_masks are copied to new irq_desc.
- * If !CONFIG_CPUMASKS_OFFSTACK the cpumasks are embedded in the
+ * If !CONFIG_CPUMASK_OFFSTACK the cpumasks are embedded in the
* irq_desc struct so the copy is redundant.
*/

static inline void init_copy_desc_masks(struct irq_desc *old_desc,
struct irq_desc *new_desc)
{
-#ifdef CONFIG_CPUMASKS_OFFSTACK
+#ifdef CONFIG_CPUMASK_OFFSTACK
cpumask_copy(new_desc->affinity, old_desc->affinity);

#ifdef CONFIG_GENERIC_PENDING_IRQ


The next one is CONFIG_CPU_HOTPLUG:

diff --git a/kernel/smp.c b/kernel/smp.c
index ad63d85..94188b8 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -57,7 +57,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
return NOTIFY_BAD;
break;

-#ifdef CONFIG_CPU_HOTPLUG
+#ifdef CONFIG_HOTPLUG_CPU
case CPU_UP_CANCELED:
case CPU_UP_CANCELED_FROZEN:

I'm sure that there are quite some false positives in that list, e.g. it
seems that it does not ignore comments, or that it assumes that all
CONFIG_ definitions come from kconfig (this is not true,
e.g. include/linux/memory.h defines CONFIG_MEM_BLOCK_SIZE, but there are
also other kconfig configuration overrides in some drivers). Still, the
list is still impressively long. Now I wonder if there are other, more
obvious problems with scripts/checkkconfigsymbols.sh. Or is the problem
just that this tool is underadvertised and not well-known?

--
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/