[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A03A100.5020308@cn.fujitsu.com>
Date: Fri, 08 May 2009 11:03:28 +0800
From: Li Zefan <lizf@...fujitsu.com>
To: Steven Rostedt <rostedt@...dmis.org>
CC: Ingo Molnar <mingo@...e.hu>,
Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] tracing/events: clean up for ftrace_set_clr_event()
>> @@ -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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists