All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Helight.Xu" <helight.xu@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] fix a warning on kernel/trace/trace_branch.c
Date: Wed, 07 Oct 2009 15:39:37 +0800	[thread overview]
Message-ID: <4ACC45B9.6070202@gmail.com> (raw)
In-Reply-To: <4ACC3C9D.9040106@cn.fujitsu.com>

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 <helight.xu@gmail.com>
>> ---
>>  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


  reply	other threads:[~2009-10-07  7:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07  6:39 [PATCH] fix a warning on kernel/trace/trace_branch.c Zhenwen Xu
2009-10-07  7:00 ` Li Zefan
2009-10-07  7:39   ` Helight.Xu [this message]
2009-10-07 13:18     ` Steven Rostedt

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=4ACC45B9.6070202@gmail.com \
    --to=helight.xu@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.