fix this warning:
kernel/trace/trace_branch.c: In function ‘probe_likely_condition’:
kernel/trace/trace_branch.c:58: warning: passing argument 1 of ‘
trace_buffer_lock_reserve’ from incompatible pointer type
The "tr" should be "(struct buffer *)tr" or "tr->buffer" here!!!
Signed-off-by: Zhenwen Xu <[email protected]>
---
kernel/trace/trace_branch.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
index 7a7a9fd..216e2dd 100644
--- a/kernel/trace/trace_branch.c
+++ b/kernel/trace/trace_branch.c
@@ -54,7 +54,7 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
goto out;
pc = preempt_count();
- event = trace_buffer_lock_reserve(tr, TRACE_BRANCH,
+ event = trace_buffer_lock_reserve(tr->buffer, TRACE_BRANCH,
sizeof(*entry), flags, pc);
if (!event)
goto out;
--
1.6.3.3
--
--------------------------------
http://zhwen.org - Open and Free
Zhenwen Xu wrote:
> fix this warning:
>
> kernel/trace/trace_branch.c: In function ‘probe_likely_condition’:
> kernel/trace/trace_branch.c:58: warning: passing argument 1 of ‘
> trace_buffer_lock_reserve’ from incompatible pointer type
>
> The "tr" should be "(struct buffer *)tr" or "tr->buffer" here!!!
>
It's caused by the API change of trace_buffer_lock_reserve() by
commit e77405ad80f53966524b5c31244e13fbbbecbd84.
Could you send an updated patch to also fix the same bug
in kernel/trace/trace_hw_branch.c ?
> Signed-off-by: Zhenwen Xu <[email protected]>
> ---
> kernel/trace/trace_branch.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
> index 7a7a9fd..216e2dd 100644
> --- a/kernel/trace/trace_branch.c
> +++ b/kernel/trace/trace_branch.c
> @@ -54,7 +54,7 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
> goto out;
>
> pc = preempt_count();
> - event = trace_buffer_lock_reserve(tr, TRACE_BRANCH,
> + event = trace_buffer_lock_reserve(tr->buffer, TRACE_BRANCH,
> sizeof(*entry), flags, pc);
> if (!event)
> goto out;
Li Zefan wrote:
> Zhenwen Xu wrote:
>
>> fix this warning:
>>
>> kernel/trace/trace_branch.c: In function ‘probe_likely_condition’:
>> kernel/trace/trace_branch.c:58: warning: passing argument 1 of ‘
>> trace_buffer_lock_reserve’ from incompatible pointer type
>>
>> The "tr" should be "(struct buffer *)tr" or "tr->buffer" here!!!
>>
>>
>
> It's caused by the API change of trace_buffer_lock_reserve() by
> commit e77405ad80f53966524b5c31244e13fbbbecbd84.
>
> Could you send an updated patch to also fix the same bug
> in kernel/trace/trace_hw_branch.c ?
>
Roger that!
>
>> Signed-off-by: Zhenwen Xu <[email protected]>
>> ---
>> kernel/trace/trace_branch.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
>> index 7a7a9fd..216e2dd 100644
>> --- a/kernel/trace/trace_branch.c
>> +++ b/kernel/trace/trace_branch.c
>> @@ -54,7 +54,7 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
>> goto out;
>>
>> pc = preempt_count();
>> - event = trace_buffer_lock_reserve(tr, TRACE_BRANCH,
>> + event = trace_buffer_lock_reserve(tr->buffer, TRACE_BRANCH,
>> sizeof(*entry), flags, pc);
>> if (!event)
>> goto out;
>>
>
>
>
--
---------------------------------
Zhenwen Xu - Open and Free
Home Page: http://zhwen.org
On Wed, 2009-10-07 at 15:39 +0800, Helight.Xu wrote:
> Li Zefan wrote:
> > Zhenwen Xu wrote:
> >
> >> fix this warning:
> >>
> >> kernel/trace/trace_branch.c: In function ‘probe_likely_condition’:
> >> kernel/trace/trace_branch.c:58: warning: passing argument 1 of ‘
> >> trace_buffer_lock_reserve’ from incompatible pointer type
> >>
> >> The "tr" should be "(struct buffer *)tr" or "tr->buffer" here!!!
> >>
> >>
> >
> > It's caused by the API change of trace_buffer_lock_reserve() by
> > commit e77405ad80f53966524b5c31244e13fbbbecbd84.
> >
> > Could you send an updated patch to also fix the same bug
> > in kernel/trace/trace_hw_branch.c ?
> >
> Roger that!
Thanks!
I'll pull in this fix now. You can just send a separate patch with the
other fix.
-- Steve
> >
> >> Signed-off-by: Zhenwen Xu <[email protected]>
> >> ---
> >> kernel/trace/trace_branch.c | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/kernel/trace/trace_branch.c b/kernel/trace/trace_branch.c
> >> index 7a7a9fd..216e2dd 100644
> >> --- a/kernel/trace/trace_branch.c
> >> +++ b/kernel/trace/trace_branch.c
> >> @@ -54,7 +54,7 @@ probe_likely_condition(struct ftrace_branch_data *f, int val, int expect)
> >> goto out;
> >>
> >> pc = preempt_count();
> >> - event = trace_buffer_lock_reserve(tr, TRACE_BRANCH,
> >> + event = trace_buffer_lock_reserve(tr->buffer, TRACE_BRANCH,
> >> sizeof(*entry), flags, pc);
> >> if (!event)
> >> goto out;
> >>
> >
> >
> >
>
>