Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] [PATCH 2/4] char *->const char * for ltt_relay_create_channel
@ 2008-10-23 10:46 Zhaolei
  2008-10-24 14:20 ` Mathieu Desnoyers
  0 siblings, 1 reply; 2+ messages in thread
From: Zhaolei @ 2008-10-23 10:46 UTC (permalink / raw)


trace_name and trace_name are not changed in function.
so we should define them as const char *

Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
---
 include/linux/ltt-tracer.h |    4 ++--
 ltt/ltt-relay-locked.c     |    4 ++--
 ltt/ltt-relay.c            |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/ltt-tracer.h b/include/linux/ltt-tracer.h
index f59cb02..a1c6c14 100644
--- a/include/linux/ltt-tracer.h
+++ b/include/linux/ltt-tracer.h
@@ -191,8 +191,8 @@ struct ltt_trace_ops {
 	/* End of first 32 bytes cacheline */
 	int (*create_dirs) (struct ltt_trace_struct *new_trace);
 	void (*remove_dirs) (struct ltt_trace_struct *new_trace);
-	int (*create_channel) (char *trace_name, struct ltt_trace_struct *trace,
-				struct dentry *dir, char *channel_name,
+	int (*create_channel) (const char *trace_name, struct ltt_trace_struct *trace,
+				struct dentry *dir, const char *channel_name,
 				struct ltt_channel_struct **ltt_chan,
 				unsigned int subbuf_size,
 				unsigned int n_subbufs, int overwrite);
diff --git a/ltt/ltt-relay-locked.c b/ltt/ltt-relay-locked.c
index b8423a6..779ff89 100644
--- a/ltt/ltt-relay-locked.c
+++ b/ltt/ltt-relay-locked.c
@@ -710,9 +710,9 @@ static void ltt_relay_destroy_buffer(struct ltt_channel_struct *ltt_chan,
 /*
  * Create channel.
  */
-static int ltt_relay_create_channel(char *trace_name,
+static int ltt_relay_create_channel(const char *trace_name,
 		struct ltt_trace_struct *trace, struct dentry *dir,
-		char *channel_name, struct ltt_channel_struct **ltt_chan,
+		const char *channel_name, struct ltt_channel_struct **ltt_chan,
 		unsigned int subbuf_size, unsigned int n_subbufs,
 		int overwrite)
 {
diff --git a/ltt/ltt-relay.c b/ltt/ltt-relay.c
index cf17bae..86f5082 100644
--- a/ltt/ltt-relay.c
+++ b/ltt/ltt-relay.c
@@ -723,9 +723,9 @@ static void ltt_relay_destroy_buffer(struct ltt_channel_struct *ltt_chan,
 /*
  * Create channel.
  */
-static int ltt_relay_create_channel(char *trace_name,
+static int ltt_relay_create_channel(const char *trace_name,
 		struct ltt_trace_struct *trace, struct dentry *dir,
-		char *channel_name, struct ltt_channel_struct **ltt_chan,
+		const char *channel_name, struct ltt_channel_struct **ltt_chan,
 		unsigned int subbuf_size, unsigned int n_subbufs,
 		int overwrite)
 {
-- 
1.5.5.3






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

* [ltt-dev] [PATCH 2/4] char *->const char * for ltt_relay_create_channel
  2008-10-23 10:46 [ltt-dev] [PATCH 2/4] char *->const char * for ltt_relay_create_channel Zhaolei
@ 2008-10-24 14:20 ` Mathieu Desnoyers
  0 siblings, 0 replies; 2+ messages in thread
From: Mathieu Desnoyers @ 2008-10-24 14:20 UTC (permalink / raw)


* Zhaolei (zhaolei at cn.fujitsu.com) wrote:
> trace_name and trace_name are not changed in function.
> so we should define them as const char *
> 

Given it touches many files in the patchset, I've merged these changes
manually. Note that the ltt-tracer.h modification seems to go larger
than 80 columns. Running

scripts/checkpatch.pl patches/`quilt top`

should take care of detecting such style issues.

Mathieu

> Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
> ---
>  include/linux/ltt-tracer.h |    4 ++--
>  ltt/ltt-relay-locked.c     |    4 ++--
>  ltt/ltt-relay.c            |    4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/ltt-tracer.h b/include/linux/ltt-tracer.h
> index f59cb02..a1c6c14 100644
> --- a/include/linux/ltt-tracer.h
> +++ b/include/linux/ltt-tracer.h
> @@ -191,8 +191,8 @@ struct ltt_trace_ops {
>  	/* End of first 32 bytes cacheline */
>  	int (*create_dirs) (struct ltt_trace_struct *new_trace);
>  	void (*remove_dirs) (struct ltt_trace_struct *new_trace);
> -	int (*create_channel) (char *trace_name, struct ltt_trace_struct *trace,
> -				struct dentry *dir, char *channel_name,
> +	int (*create_channel) (const char *trace_name, struct ltt_trace_struct *trace,
> +				struct dentry *dir, const char *channel_name,
>  				struct ltt_channel_struct **ltt_chan,
>  				unsigned int subbuf_size,
>  				unsigned int n_subbufs, int overwrite);
> diff --git a/ltt/ltt-relay-locked.c b/ltt/ltt-relay-locked.c
> index b8423a6..779ff89 100644
> --- a/ltt/ltt-relay-locked.c
> +++ b/ltt/ltt-relay-locked.c
> @@ -710,9 +710,9 @@ static void ltt_relay_destroy_buffer(struct ltt_channel_struct *ltt_chan,
>  /*
>   * Create channel.
>   */
> -static int ltt_relay_create_channel(char *trace_name,
> +static int ltt_relay_create_channel(const char *trace_name,
>  		struct ltt_trace_struct *trace, struct dentry *dir,
> -		char *channel_name, struct ltt_channel_struct **ltt_chan,
> +		const char *channel_name, struct ltt_channel_struct **ltt_chan,
>  		unsigned int subbuf_size, unsigned int n_subbufs,
>  		int overwrite)
>  {
> diff --git a/ltt/ltt-relay.c b/ltt/ltt-relay.c
> index cf17bae..86f5082 100644
> --- a/ltt/ltt-relay.c
> +++ b/ltt/ltt-relay.c
> @@ -723,9 +723,9 @@ static void ltt_relay_destroy_buffer(struct ltt_channel_struct *ltt_chan,
>  /*
>   * Create channel.
>   */
> -static int ltt_relay_create_channel(char *trace_name,
> +static int ltt_relay_create_channel(const char *trace_name,
>  		struct ltt_trace_struct *trace, struct dentry *dir,
> -		char *channel_name, struct ltt_channel_struct **ltt_chan,
> +		const char *channel_name, struct ltt_channel_struct **ltt_chan,
>  		unsigned int subbuf_size, unsigned int n_subbufs,
>  		int overwrite)
>  {
> -- 
> 1.5.5.3
> 
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68



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

end of thread, other threads:[~2008-10-24 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-23 10:46 [ltt-dev] [PATCH 2/4] char *->const char * for ltt_relay_create_channel Zhaolei
2008-10-24 14:20 ` Mathieu Desnoyers

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