From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: trivial@kernel.org
Subject: [PATCH] Add documentation to some preprocessor directives in init/*.c.
Date: Tue, 28 Aug 2007 01:56:24 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0708280153050.28330@localhost.localdomain> (raw)
Add some documentation to potentially confusing preprocessor
directives in some source files in the init/ directory to show their
proper association and nesting.
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
---
not all of them, just those that are sufficiently distant from their
initial tests or are nested, to make perusing the code easier.
init/calibrate.c | 2 +-
init/initramfs.c | 4 ++--
init/main.c | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/init/calibrate.c b/init/calibrate.c
index 40ff3b4..783a907 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -101,7 +101,7 @@ static unsigned long __devinit calibrate_delay_direct(void)
"estimate for loops_per_jiffy.\nProbably due to long platform interrupts. Consider using \"lpj=\" boot option.\n");
return 0;
}
-#else
+#else /* !ARCH_HAS_READ_CURRENT_TIMER */
static unsigned long __devinit calibrate_delay_direct(void) {return 0;}
#endif
diff --git a/init/initramfs.c b/init/initramfs.c
index 1db02a0..2493c5b 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -539,7 +539,7 @@ skip:
initrd_end = 0;
}
-#endif
+#endif /* CONFIG_BLK_DEV_INITRD */
static int __init populate_rootfs(void)
{
@@ -579,7 +579,7 @@ static int __init populate_rootfs(void)
free_initrd();
#endif
}
-#endif
+#endif /* CONFIG_BLK_DEV_INITRD */
return 0;
}
rootfs_initcall(populate_rootfs);
diff --git a/init/main.c b/init/main.c
index 450e6ee..781b1fb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -169,7 +169,7 @@ static int __init maxcpus(char *str)
}
early_param("maxcpus", maxcpus);
-#else
+#else /* !CONFIG_SMP */
#define max_cpus NR_CPUS
#endif
@@ -367,7 +367,7 @@ static void __init smp_init(void)
static inline void setup_per_cpu_areas(void) { }
static inline void smp_prepare_cpus(unsigned int maxcpus) { }
-#else
+#else /* CONFIG_SMP */
#ifdef __GENERIC_PER_CPU
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
@@ -414,7 +414,7 @@ static void __init smp_init(void)
smp_cpus_done(max_cpus);
}
-#endif
+#endif /* CONFIG_SMP */
/*
* We need to store the untouched command line for future reference.
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
next reply other threads:[~2007-08-28 6:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-28 5:56 Robert P. J. Day [this message]
2007-08-28 20:42 ` Alexey Dobriyan
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=Pine.LNX.4.64.0708280153050.28330@localhost.localdomain \
--to=rpjday@mindspring.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@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®