Skip to contentSkip to conversation

remove overwrite_paravirt_ops

PATCH New Chris Wright 1 participant 1 message Aug 16, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove overwrite_paravirt_ops

It's not used, and we can be explicit in a paravirt_ops about which native pieces are preferred, so it's not needed. Also, the loop is a bit dodgy (works ok, since sizeof(unsigned int) is 4 on x86, but...) Before I commit, any objections?

---

arch/i386/kernel/paravirt.c +0 -12
diff -r ea8912509a0e arch/i386/kernel/paravirt.c
@@ -402,18 +402,6 @@ static void __init default_banner(void)
 {
 	printk(KERN_INFO "Booting paravirtualized kernel on %s\n",
 	       paravirt_ops.name);
-}
-
-/* Overwrite ops struct with non-NULL ops entries from this struct. */
-void overwrite_paravirt_ops(const struct paravirt_ops *ops)
-{
-	unsigned int i;
-	void **src = (void **)ops, **dst = (void **)&paravirt_ops;
-
-	for (i = 0; i < sizeof(struct paravirt_ops) / 4; i++) {
-		if (src[i])
-			dst[i] = src[i];
-	}
 }
 
 static int __init print_banner(void)
include/asm-i386/paravirt.h +0 -3
diff -r ea8912509a0e include/asm-i386/paravirt.h
@@ -110,9 +110,6 @@ struct paravirt_ops
 		__attribute__((__section__(".paravirtprobe"))) = fn
 
 extern struct paravirt_ops paravirt_ops;
-
-/* Overwrite ops struct with non-NULL ops entries from this struct. */
-void overwrite_paravirt_ops(const struct paravirt_ops *ops);
 
 /* Non-paravirtualized implementations of various operations for
    back-ends which don't need their own version. */