From: zhaolei@cn.fujitsu.com (Zhaolei)
Subject: [ltt-dev] [PATCH 3/4] Fix a compile warning of 'initialization from incompatible pointer type'
Date: Thu, 23 Oct 2008 18:46:59 +0800 [thread overview]
Message-ID: <49005623.7070009@cn.fujitsu.com> (raw)
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.
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
next reply other threads:[~2008-10-23 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-23 10:46 Zhaolei [this message]
2008-10-24 14:23 ` Mathieu Desnoyers
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=49005623.7070009@cn.fujitsu.com \
--to=zhaolei@cn.fujitsu.com \
/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