From: Reinhard Tartler <siretart@tauware.de>
To: linux-kernel@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: is scripts/checkkconfigsymbols.sh actually used?
Date: Tue, 21 Jul 2009 17:45:21 +0200 [thread overview]
Message-ID: <87eisaujji.fsf@faui44a.informatik.uni-erlangen.de> (raw)
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
reply other threads:[~2009-07-21 15:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eisaujji.fsf@faui44a.informatik.uni-erlangen.de \
--to=siretart@tauware.de \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®