public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Kprobes: Make kprobe.symbol_name const
@ 2007-03-15  4:35 Ananth N Mavinakayanahalli
  2007-03-15  9:15 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Ananth N Mavinakayanahalli @ 2007-03-15  4:35 UTC (permalink / raw)
  To: lkml; +Cc: akpm, hch, Prasanna S Panchamukhi, Jim Keniston

From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

Kprobes doesn't scribble the kprobe.symbol_name field. Its only set by
the module when registering the probe. Modules that exercise good
hygiene using the "const" qualifier will see warnings...

	warning: assignment discards qualifiers from pointer target type

Make struct kprobe.symbol_name const char *

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>

---
 include/linux/kprobes.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.21-rc3/include/linux/kprobes.h
===================================================================
--- linux-2.6.21-rc3.orig/include/linux/kprobes.h
+++ linux-2.6.21-rc3/include/linux/kprobes.h
@@ -78,7 +78,7 @@ struct kprobe {
 	kprobe_opcode_t *addr;
 
 	/* Allow user to indicate symbol name of the probe point */
-	char *symbol_name;
+	const char *symbol_name;
 
 	/* Offset into the symbol */
 	unsigned int offset;

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

* Re: [PATCH] Kprobes: Make kprobe.symbol_name const
  2007-03-15  4:35 [PATCH] Kprobes: Make kprobe.symbol_name const Ananth N Mavinakayanahalli
@ 2007-03-15  9:15 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2007-03-15  9:15 UTC (permalink / raw)
  To: Ananth N Mavinakayanahalli
  Cc: lkml, akpm, hch, Prasanna S Panchamukhi, Jim Keniston

On Thu, Mar 15, 2007 at 10:05:47AM +0530, Ananth N Mavinakayanahalli wrote:
> From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> 
> Kprobes doesn't scribble the kprobe.symbol_name field. Its only set by
> the module when registering the probe. Modules that exercise good
> hygiene using the "const" qualifier will see warnings...
> 
> 	warning: assignment discards qualifiers from pointer target type
> 
> Make struct kprobe.symbol_name const char *

Ok.


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

end of thread, other threads:[~2007-03-15  9:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15  4:35 [PATCH] Kprobes: Make kprobe.symbol_name const Ananth N Mavinakayanahalli
2007-03-15  9:15 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox