public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: anton@samba.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] redue ifdef clutter in arch/ppc64/kernel/idle.c
Date: Sun, 26 Sep 2004 14:23:21 +0200	[thread overview]
Message-ID: <20040926122321.GA2265@lst.de> (raw)


--- 1.26/arch/ppc64/kernel/idle.c	2004-09-22 11:56:16 +02:00
+++ edited/arch/ppc64/kernel/idle.c	2004-09-25 17:20:32 +02:00
@@ -334,20 +334,24 @@
 }
 __initcall(register_powersave_nap_sysctl);
 #endif
+	
+/*
+ * Move that junk to each platform specific file, eventually define
+ * a pSeries_idle for shared processor stuff
+ */
 
-int idle_setup(void)
-{
-	/*
-	 * Move that junk to each platform specific file, eventually define
-	 * a pSeries_idle for shared processor stuff
-	 */
 #ifdef CONFIG_PPC_ISERIES
+static void iseries_idle_setup(void)
+{
 	idle_loop = iSeries_idle;
-	return 1;
+}
 #else
-	idle_loop = default_idle;
+# define iseries_idle_setup()	do { } while (0)
 #endif
+
 #ifdef CONFIG_PPC_PSERIES
+static void pseries_idle_setup(void)
+{
 	if (systemcfg->platform & PLATFORM_PSERIES) {
 		if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
 			if (get_paca()->lppaca.xSharedProc) {
@@ -362,13 +366,30 @@
 			idle_loop = default_idle;
 		}
 	}
-#endif /* CONFIG_PPC_PSERIES */
+}
+#else
+# define pseries_idle_setup()	do { } while (0)
+#endif
+
 #ifdef CONFIG_PPC_PMAC
+static void pmac_idle_setup(void)
+{
 	if (systemcfg->platform == PLATFORM_POWERMAC) {
 		printk(KERN_INFO "Using native/NAP idle loop\n");
 		idle_loop = native_idle;
 	}
-#endif /* CONFIG_PPC_PMAC */
+}
+#else
+# define pmac_idle_setup()	do { } while (0)
+#endif
+
+int idle_setup(void)
+{
+	idle_loop = default_idle;
+
+	iseries_idle_setup();
+	pseries_idle_setup();
+	pmac_idle_setup();
 
 	return 1;
 }

                 reply	other threads:[~2004-09-26 12:23 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=20040926122321.GA2265@lst.de \
    --to=hch@lst.de \
    --cc=anton@samba.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