From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] [PATCH 3/4] Fix a compile warning of 'initialization from incompatible pointer type'
Date: Fri, 24 Oct 2008 10:23:43 -0400 [thread overview]
Message-ID: <20081024142343.GE24251@Krystal> (raw)
In-Reply-To: <49005623.7070009@cn.fujitsu.com>
* Zhaolei (zhaolei at cn.fujitsu.com) wrote:
> Warning is:
> ltt/ltt-relay.c:1602: warning: initialization from incompatible pointer type
>
> Return value of ltt_relay_reserve_slot should be int because it only return
> errorcode or 0.
>
Also merged manually given it touches 3 different patches. Thanks !
Mathieu
> Signed-off-by: Zhao Lei <zhaolei at cn.fujitsu.com>
> ---
> include/linux/ltt-tracer.h | 2 +-
> ltt/ltt-relay-locked.c | 2 +-
> ltt/ltt-relay.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/ltt-tracer.h b/include/linux/ltt-tracer.h
> index a1c6c14..f7cb1d1 100644
> --- a/include/linux/ltt-tracer.h
> +++ b/include/linux/ltt-tracer.h
> @@ -174,7 +174,7 @@ struct user_dbg_data {
>
> struct ltt_trace_ops {
> /* First 32 bytes cache-hot cacheline */
> - ssize_t (*reserve_slot) (struct ltt_trace_struct *trace,
> + int (*reserve_slot) (struct ltt_trace_struct *trace,
> struct ltt_channel_struct *channel,
> void **transport_data, size_t data_size,
> size_t *slot_size, long *buf_offset, u64 *tsc,
> diff --git a/ltt/ltt-relay-locked.c b/ltt/ltt-relay-locked.c
> index 779ff89..ab402f8 100644
> --- a/ltt/ltt-relay-locked.c
> +++ b/ltt/ltt-relay-locked.c
> @@ -1252,7 +1252,7 @@ static inline void ltt_reserve_end_switch_current(
> *
> * It will take care of sub-buffer switching.
> */
> -static notrace long ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> +static notrace int ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> struct ltt_channel_struct *ltt_channel, void **transport_data,
> size_t data_size, size_t *slot_size, long *buf_offset, u64 *tsc,
> unsigned int *rflags, int largest_align, int cpu)
> diff --git a/ltt/ltt-relay.c b/ltt/ltt-relay.c
> index 86f5082..5667ab8 100644
> --- a/ltt/ltt-relay.c
> +++ b/ltt/ltt-relay.c
> @@ -1278,7 +1278,7 @@ static inline void ltt_reserve_end_switch_current(
> *
> * It will take care of sub-buffer switching.
> */
> -static notrace long ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> +static notrace int ltt_relay_reserve_slot(struct ltt_trace_struct *trace,
> struct ltt_channel_struct *ltt_channel, void **transport_data,
> size_t data_size, size_t *slot_size, long *buf_offset, u64 *tsc,
> unsigned int *rflags, int largest_align, int cpu)
> --
> 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
prev parent reply other threads:[~2008-10-24 14:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 10:46 Zhaolei
2008-10-24 14:23 ` Mathieu Desnoyers [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081024142343.GE24251@Krystal \
--to=compudj@krystal.dyndns.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox