linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [2.6 patch] kernel/kprobes.c: fix a warning #ifndef ARCH_SUPPORTS_KRETPROBES
@ 2006-01-19  2:11 Adrian Bunk
  2006-01-19  4:05 ` Ananth N Mavinakayanahalli
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2006-01-19  2:11 UTC (permalink / raw)
  To: Andrew Morton; +Cc: prasanna, ananth, anil.s.keshavamurthy, davem, linux-kernel

This patch fixes the following warning #ifndef ARCH_SUPPORTS_KRETPROBES:

<--  snip  -->

...
  CC      kernel/kprobes.o
kernel/kprobes.c:353: warning: 'pre_handler_kretprobe' defined but not used
...

<--  snip  -->


Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 14 Jan 2006

--- linux-2.6.15-mm4-sparc64/kernel/kprobes.c.old	2006-01-14 20:17:59.000000000 +0100
+++ linux-2.6.15-mm4-sparc64/kernel/kprobes.c	2006-01-14 20:19:03.000000000 +0100
@@ -344,23 +344,6 @@
 	spin_unlock_irqrestore(&kretprobe_lock, flags);
 }
 
-/*
- * This kprobe pre_handler is registered with every kretprobe. When probe
- * hits it will set up the return probe.
- */
-static int __kprobes pre_handler_kretprobe(struct kprobe *p,
-					   struct pt_regs *regs)
-{
-	struct kretprobe *rp = container_of(p, struct kretprobe, kp);
-	unsigned long flags = 0;
-
-	/*TODO: consider to only swap the RA after the last pre_handler fired */
-	spin_lock_irqsave(&kretprobe_lock, flags);
-	arch_prepare_kretprobe(rp, regs);
-	spin_unlock_irqrestore(&kretprobe_lock, flags);
-	return 0;
-}
-
 static inline void free_rp_inst(struct kretprobe *rp)
 {
 	struct kretprobe_instance *ri;
@@ -578,6 +561,23 @@
 
 #ifdef ARCH_SUPPORTS_KRETPROBES
 
+/*
+ * This kprobe pre_handler is registered with every kretprobe. When probe
+ * hits it will set up the return probe.
+ */
+static int __kprobes pre_handler_kretprobe(struct kprobe *p,
+					   struct pt_regs *regs)
+{
+	struct kretprobe *rp = container_of(p, struct kretprobe, kp);
+	unsigned long flags = 0;
+
+	/*TODO: consider to only swap the RA after the last pre_handler fired */
+	spin_lock_irqsave(&kretprobe_lock, flags);
+	arch_prepare_kretprobe(rp, regs);
+	spin_unlock_irqrestore(&kretprobe_lock, flags);
+	return 0;
+}
+
 int __kprobes register_kretprobe(struct kretprobe *rp)
 {
 	int ret = 0;


^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: [2.6 patch] kernel/kprobes.c: fix a warning #ifndef ARCH_SUPPORTS_KRETPROBES
@ 2006-01-19 16:18 Keshavamurthy, Anil S
  0 siblings, 0 replies; 4+ messages in thread
From: Keshavamurthy, Anil S @ 2006-01-19 16:18 UTC (permalink / raw)
  To: Adrian Bunk, Andrew Morton; +Cc: prasanna, ananth, davem, linux-kernel

Andrew,
	This patch looks good to me and Acking this patch, please apply.

-Anil Keshavamurthy

>From: Adrian Bunk [mailto:bunk@stusta.de] 
>Sent: Wednesday, January 18, 2006 6:12 PM
>To: Andrew Morton
>Cc: prasanna@in.ibm.com; ananth@in.ibm.com; Keshavamurthy, 
>Anil S; davem@davemloft.net; linux-kernel@vger.kernel.org
>Subject: [2.6 patch] kernel/kprobes.c: fix a warning #ifndef 
>ARCH_SUPPORTS_KRETPROBES
>
>This patch fixes the following warning #ifndef 
>ARCH_SUPPORTS_KRETPROBES:
>
><--  snip  -->
>
>...
>  CC      kernel/kprobes.o
>kernel/kprobes.c:353: warning: 'pre_handler_kretprobe' defined 
>but not used
>...
>
><--  snip  -->
>
>
>Signed-off-by: Adrian Bunk <bunk@stusta.de>

Acked-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>

>
>---
>
>This patch was already sent on:
>- 14 Jan 2006


^ permalink raw reply	[flat|nested] 4+ messages in thread
* [2.6 patch] kernel/kprobes.c: fix a warning #ifndef ARCH_SUPPORTS_KRETPROBES
@ 2006-01-14 19:55 Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2006-01-14 19:55 UTC (permalink / raw)
  To: prasanna, ananth, anil.s.keshavamurthy, davem; +Cc: linux-kernel

This patch fixes the following warning #ifndef ARCH_SUPPORTS_KRETPROBES:

<--  snip  -->

...
  CC      kernel/kprobes.o
kernel/kprobes.c:353: warning: 'pre_handler_kretprobe' defined but not used
...

<--  snip  -->


Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.15-mm4-sparc64/kernel/kprobes.c.old	2006-01-14 20:17:59.000000000 +0100
+++ linux-2.6.15-mm4-sparc64/kernel/kprobes.c	2006-01-14 20:19:03.000000000 +0100
@@ -344,23 +344,6 @@
 	spin_unlock_irqrestore(&kretprobe_lock, flags);
 }
 
-/*
- * This kprobe pre_handler is registered with every kretprobe. When probe
- * hits it will set up the return probe.
- */
-static int __kprobes pre_handler_kretprobe(struct kprobe *p,
-					   struct pt_regs *regs)
-{
-	struct kretprobe *rp = container_of(p, struct kretprobe, kp);
-	unsigned long flags = 0;
-
-	/*TODO: consider to only swap the RA after the last pre_handler fired */
-	spin_lock_irqsave(&kretprobe_lock, flags);
-	arch_prepare_kretprobe(rp, regs);
-	spin_unlock_irqrestore(&kretprobe_lock, flags);
-	return 0;
-}
-
 static inline void free_rp_inst(struct kretprobe *rp)
 {
 	struct kretprobe_instance *ri;
@@ -578,6 +561,23 @@
 
 #ifdef ARCH_SUPPORTS_KRETPROBES
 
+/*
+ * This kprobe pre_handler is registered with every kretprobe. When probe
+ * hits it will set up the return probe.
+ */
+static int __kprobes pre_handler_kretprobe(struct kprobe *p,
+					   struct pt_regs *regs)
+{
+	struct kretprobe *rp = container_of(p, struct kretprobe, kp);
+	unsigned long flags = 0;
+
+	/*TODO: consider to only swap the RA after the last pre_handler fired */
+	spin_lock_irqsave(&kretprobe_lock, flags);
+	arch_prepare_kretprobe(rp, regs);
+	spin_unlock_irqrestore(&kretprobe_lock, flags);
+	return 0;
+}
+
 int __kprobes register_kretprobe(struct kretprobe *rp)
 {
 	int ret = 0;


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-19 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-19  2:11 [2.6 patch] kernel/kprobes.c: fix a warning #ifndef ARCH_SUPPORTS_KRETPROBES Adrian Bunk
2006-01-19  4:05 ` Ananth N Mavinakayanahalli
  -- strict thread matches above, loose matches on Subject: below --
2006-01-19 16:18 Keshavamurthy, Anil S
2006-01-14 19:55 Adrian Bunk

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).