From: Li Zefan <lizf@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] tracing/events: clean up for ftrace_set_clr_event()
Date: Fri, 08 May 2009 11:03:28 +0800 [thread overview]
Message-ID: <4A03A100.5020308@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0905072248180.28378@gandalf.stny.rr.com>
>> @@ -500,30 +505,16 @@ system_enable_write(struct file *filp, const char __user *ubuf, size_t cnt,
>> if (ret < 0)
>> return ret;
>>
>> - switch (val) {
>> - case 0:
>> - case 1:
>> - break;
>> -
>> - default:
>> + if (val != 0 && val != 1)
>
> What about "if (val & ~1UL)"?
>
I tried it just now:
text data bss dec hex filename
7480 104 8 7592 1da8 kernel/trace/trace_events.o.orig
text data bss dec hex filename
7482 104 8 7594 1daa kernel/trace/trace_events.o
It increased text size by 2 bytes, gcc did a better work. ;)
And it's not so intuitive what's the limit of val.
next prev parent reply other threads:[~2009-05-08 3:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-08 2:31 [PATCH 1/2] tracing/events: clean up for ftrace_set_clr_event() Li Zefan
2009-05-08 2:32 ` [PATCH 2/2] tracing/events: simplify system_enable_read() Li Zefan
2009-05-08 2:44 ` Steven Rostedt
2009-05-08 11:03 ` Frederic Weisbecker
2009-05-08 18:27 ` [tip:tracing/core] " tip-bot for Li Zefan
2009-05-08 22:52 ` [PATCH 2/2] " Andrew Morton
2009-05-11 12:40 ` Ingo Molnar
2009-05-08 2:52 ` [PATCH 1/2] tracing/events: clean up for ftrace_set_clr_event() Steven Rostedt
2009-05-08 3:03 ` Li Zefan [this message]
2009-05-08 10:50 ` Frederic Weisbecker
2009-05-08 11:16 ` Li Zefan
2009-05-08 11:27 ` Frederic Weisbecker
2009-05-08 12:05 ` Ingo Molnar
2009-05-08 12:01 ` Steven Rostedt
2009-05-08 11:35 ` Steven Rostedt
2009-05-08 11:47 ` Frederic Weisbecker
2009-05-08 18:27 ` [tip:tracing/core] " tip-bot for Li Zefan
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=4A03A100.5020308@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox