[Lguest] [PATCH] use cpu capabilities macros
Matias Zabaljauregui
zabaljauregui at gmail.com
Tue Jul 22 06:58:29 EST 2008
Hello Rusty,
I'm getting these warning messages while building lguest (2.6.26):
CC [M] drivers/lguest/x86/core.o
drivers/lguest/x86/core.c: In function 'lguest_arch_host_init':
drivers/lguest/x86/core.c:483: warning: passing argument 2 of
'clear_bit' from incompatible pointer type
drivers/lguest/x86/core.c: In function 'lguest_arch_host_fini':
drivers/lguest/x86/core.c:494: warning: passing argument 2 of
'set_bit' from incompatible pointer type
The macros set_cpu_cap and clear_cpu_cap use the right casting:
Use clear_cpu_cap and set_cpu_cap instead of clear_bit and set_bit
Signed-off-by: Matias Zabaljauregui <zabaljauregui at gmail.com>
---
diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
index 95dfda5..0471aa5 100644
--- a/drivers/lguest/x86/core.c
+++ b/drivers/lguest/x86/core.c
@@ -480,7 +480,7 @@ void __init lguest_arch_host_init(void)
* bit on its CPU, depending on the argument (0 == unset). */
on_each_cpu(adjust_pge, (void *)0, 1);
/* Turn off the feature in the global feature set. */
- clear_bit(X86_FEATURE_PGE, boot_cpu_data.x86_capability);
+ clear_cpu_cap(&boot_cpu_data, X86_FEATURE_PGE);
}
put_online_cpus();
};
@@ -491,7 +491,7 @@ void __exit lguest_arch_host_fini(void)
/* If we had PGE before we started, turn it back on now. */
get_online_cpus();
if (cpu_had_pge) {
- set_bit(X86_FEATURE_PGE, boot_cpu_data.x86_capability);
+ set_cpu_cap(&boot_cpu_data, X86_FEATURE_PGE);
/* adjust_pge's argument "1" means set PGE. */
on_each_cpu(adjust_pge, (void *)1, 1);
}
regards,
Matias Zabaljauregui
More information about the Lguest
mailing list