* [PATCH] Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type'
@ 2006-11-05 6:02 Rusty Russell
2006-11-05 6:05 ` [PATCH] Fix 'arch/i386/kernel/alternative.c:355: warning: unused variable 'i'' Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2006-11-05 6:02 UTC (permalink / raw)
To: virtualization, Andrew Morton; +Cc: Chris Wright
Fix paravirt_probe() macro so that handing it start_kernel doesn't
evoke a warning (start_kernel is asmlinkage).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/dontdiff --minimal linux-2.6.19-rc4-mm2/include/asm-i386/paravirt.h working-2.6.19-rc4-mm2-warnings/include/asm-i386/paravirt.h
--- linux-2.6.19-rc4-mm2/include/asm-i386/paravirt.h 2006-11-05 15:35:55.000000000 +1100
+++ working-2.6.19-rc4-mm2-warnings/include/asm-i386/paravirt.h 2006-11-05 16:03:41.000000000 +1100
@@ -147,7 +147,7 @@ struct paravirt_ops
/* Mark a paravirt probe function. */
#define paravirt_probe(fn) \
- static void (*__paravirtprobe_##fn)(void) __attribute_used__ \
+ static asmlinkage void (*__paravirtprobe_##fn)(void) __attribute_used__ \
__attribute__((__section__(".paravirtprobe"))) = fn
extern struct paravirt_ops paravirt_ops;
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] Fix 'arch/i386/kernel/alternative.c:355: warning: unused variable 'i''
2006-11-05 6:02 [PATCH] Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type' Rusty Russell
@ 2006-11-05 6:05 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2006-11-05 6:05 UTC (permalink / raw)
To: virtualization; +Cc: Andrew Morton, Chris Wright
Fix warning about "unused variable i" when CONFIG_PARAVIRT enabled and
CONFIG_DEBUG_PARAVIRT disabled.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/dontdiff --minimal linux-2.6.19-rc4-mm2/arch/i386/kernel/alternative.c working-2.6.19-rc4-mm2-warnings/arch/i386/kernel/alternative.c
--- linux-2.6.19-rc4-mm2/arch/i386/kernel/alternative.c 2006-11-05 15:35:24.000000000 +1100
+++ working-2.6.19-rc4-mm2-warnings/arch/i386/kernel/alternative.c 2006-11-05 16:04:38.000000000 +1100
@@ -352,7 +352,6 @@ void alternatives_smp_switch(int smp)
void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end)
{
struct paravirt_patch *p;
- int i;
for (p = start; p < end; p++) {
unsigned int used;
@@ -360,6 +359,8 @@ void apply_paravirt(struct paravirt_patc
used = paravirt_ops.patch(p->instrtype, p->clobbers, p->instr,
p->len);
#ifdef CONFIG_DEBUG_PARAVIRT
+ {
+ int i;
/* Deliberately clobber regs using "not %reg" to find bugs. */
for (i = 0; i < 3; i++) {
if (p->len - used >= 2 && (p->clobbers & (1 << i))) {
@@ -368,6 +369,7 @@ void apply_paravirt(struct paravirt_patc
used += 2;
}
}
+ }
#endif
/* Pad the rest with nops */
nop_out(p->instr + used, p->len - used);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-05 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-05 6:02 [PATCH] Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type' Rusty Russell
2006-11-05 6:05 ` [PATCH] Fix 'arch/i386/kernel/alternative.c:355: warning: unused variable 'i'' Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).