Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type'
PATCH 1/1 Fix 'arch/i386/kernel/paravirt.c:481: warning: initialization from incompatible pointer type'
Fix paravirt_probe() macro so that handing it start_kernel doesn't evoke a warning (start_kernel is asmlinkage).
Signed-off-by Rusty Russell <[email protected]>
include/asm-i386/paravirt.h +1 -1
@@ -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"))) = fnextern struct paravirt_ops paravirt_ops;
PATCH 1/1 Fix 'arch/i386/kernel/alternative.c:355: warning: unused variable 'i''
Fix warning about "unused variable i" when CONFIG_PARAVIRT enabled and CONFIG_DEBUG_PARAVIRT disabled.
Signed-off-by Rusty Russell <[email protected]>
arch/i386/kernel/alternative.c +3 -1
@@ -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);