Skip to contentSkip to conversation

MD: conditionalize some code

PATCH In review Jeff Garzik 3 participants 3 messages Oct 10, 2006 – Oct 11, 2006 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MD: conditionalize some code

The autorun code is only used if this module is built into the static kernel image. Adjust #ifdefs accordingly.

---

 drivers/md/md.c               |    4 +++-
drivers/md/md.c +3 -1
index 57fa64f..c75cdf9 100644
@@ -3368,6 +3368,7 @@ out:
 	return err;
 }
 
+#ifndef MODULE
 static void autorun_array(mddev_t *mddev)
 {
 	mdk_rdev_t *rdev;
@@ -3482,6 +3483,7 @@ static void autorun_devices(int part)
 	}
 	printk(KERN_INFO "md: ... autorun DONE.\n");
 }
+#endif /* !MODULE */
 
 static int get_version(void __user * arg)
 {
@@ -5592,7 +5594,7 @@ static void autostart_arrays(int part)
 	autorun_devices(part);
 }
 
-#endif
+#endif /* !MODULE */
 
 static __exit void md_exit(void)
 {
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Tuesday October 10, [email protected] wrote:

The autorun code is only used if this module is built into the static kernel image. Adjust #ifdefs accordingly.

Thanks,
NeilBrown

Quoted 34 lines

---

 drivers/md/md.c               |    4 +++-
drivers/md/md.c +3 -1
index 57fa64f..c75cdf9 100644
@@ -3368,6 +3368,7 @@ out:
 	return err;
 }
 
+#ifndef MODULE
 static void autorun_array(mddev_t *mddev)
 {
 	mdk_rdev_t *rdev;
@@ -3482,6 +3483,7 @@ static void autorun_devices(int part)
 	}
 	printk(KERN_INFO "md: ... autorun DONE.\n");
 }
+#endif /* !MODULE */
 
 static int get_version(void __user * arg)
 {
@@ -5592,7 +5594,7 @@ static void autostart_arrays(int part)
 	autorun_devices(part);
 }
 
-#endif
+#endif /* !MODULE */
 
 static __exit void md_exit(void)
 {
#2 lore raw
Quoted 5 lines · Neil Brown
Quoted 4 lines · On Tuesday October 10, [email protected] wrote:

The autorun code is only used if this module is built into the static kernel image. Adjust #ifdefs accordingly.

Greatt - thanks! I wondered why my debian boxes weren't starting the arrays unless I used mdadm
to 'poke' them. I think I filed a bug with Debian regarding this - I'll see if I can find/update it.

Steve