[PATCH] Immediate Values - i386 Optimization - fix warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Immediate Values - i386 optimization - fix warnings

2 warnings creps in caused by my recent work with text lock edit.

arch/i386/kernel/immediate.c: In function 'arch_immediate_update':
arch/i386/kernel/immediate.c:228: warning: passing argument 1 of '__constant_memcpy' makes pointer from integer without a cast
arch/i386/kernel/immediate.c:228: warning: passing argument 1 of '__memcpy' makes pointer from integer without a cast
arch/i386/kernel/immediate.c:185: warning: unused variable 'bypass_immediate'

This trivial patch fixes this issue.

Signed-off-by: Mathieu Desnoyers <[email protected]>
---
 arch/i386/kernel/immediate.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: linux-2.6-lttng/arch/i386/kernel/immediate.c
===================================================================
--- linux-2.6-lttng.orig/arch/i386/kernel/immediate.c	2007-08-12 23:19:19.000000000 -0400
+++ linux-2.6-lttng/arch/i386/kernel/immediate.c	2007-08-12 23:19:56.000000000 -0400
@@ -182,7 +182,6 @@ __kprobes int arch_immediate_update(cons
 	int ret;
 	size_t insn_size = _immediate_get_insn_size(immediate->size);
 	long insn = immediate->immediate - insn_size;
-	long bypass_immediate;
 
 #ifdef CONFIG_KPROBES
 	/*
@@ -225,7 +224,7 @@ __kprobes int arch_immediate_update(cons
 	after_immediate = immediate->immediate + immediate->size;
 
 	kernel_text_mark_rw((unsigned long)bypass_eip, NR_NOPS);
-	memcpy(bypass_eip, (void*)insn, insn_size + immediate->size);
+	memcpy((void*)bypass_eip, (void*)insn, insn_size + immediate->size);
 	/*
 	 * Fill the rest with nops.
 	 */
-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux