From: Li Zefan <lizefan@huawei.com>
To: Joe Perches <joe@perches.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>,
Andy Whitcroft <apw@canonical.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: Checkpatch error on trace events macros
Date: Tue, 30 Jul 2013 11:25:43 +0800 [thread overview]
Message-ID: <51F73237.1010606@huawei.com> (raw)
In-Reply-To: <1375153806.2075.100.camel@joe-AO722>
On 2013/7/30 11:10, Joe Perches wrote:
> On Tue, 2013-07-30 at 11:04 +0800, Li Zefan wrote:
>> On 2013/7/30 10:36, Joe Perches wrote:
>>> On Tue, 2013-07-30 at 10:06 +0800, Li Zefan wrote:
>>>> On 2013/7/30 9:58, Joe Perches wrote:
>>>>> So what are these TRACE_<FOO> defines that need
>>>>> excluding from the "complex values" check?
>>>>>
>>>>> Anything other than
>>>>>
>>>>> TRACE_SYSTEM
>>>>> TRACE_INCLUDE_FILE
>>>>> TRACE_INCLUDE_PATH
>>>>>
>>>>> ?
>>>>>
>>>>> samples/trace_events/trace-events-sample.h
>>>>> only has those 3.
>>>>>
>>>>
>>>> Try:
>>>> # scripts/checkpatch.pl --file include/trace/events/*
>>>>
>>>> You'll see numerous errors. :)
>>>
>>> Nope, you'll see numerous whitespace defects, but no
>>> actual errors.
>>>
>>> If you run with:
>>>
>>> --ignore=spacing,long_line,code_indent,leading_space,printf_l,split_string,space_before_tab,trailing_whitespace,line_continuations
>>>
>>
>> Serious? I'd just not run checkpatch.pl. ;)
>
> Your choice. It's all whitespace and %Lx stuff.
> I think the reports are actual style defects.
> The line continuations and split strings uses are
> pretty poor there too.
>
>> The "complex values" check complaints come from many places in include/trace/events/*,
>> and I'm not going to check where and why.
>
> Nor I.
> You haven't answered my question either.
>
Oh, I overlooked it.
TRACE_SYSTEM defines the directory name in /sys/kernel/debug/tracing/events. A trace
event belongs to a trace system:
# cat /sys/kernel/debug/tracing/available_events
ext3:ext3_free_inode
ext3:ext3_request_inode
...
ext3 is the SYSTEM name.
TRACE_INCLUDE_FILE is needed if the .h filename is different than the SYSTEM name.
If the .h file is not in include/trace/events, then you must use TRACE_INCLUDE_PATH
to specify where the file is.
I'm not sure if there're any other maros need special treatment.
next prev parent reply other threads:[~2013-07-30 3:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 19:52 Checkpatch error on trace events macros Sarah Sharp
2013-07-29 20:02 ` Joe Perches
2013-07-29 21:23 ` Sarah Sharp
2013-07-29 21:48 ` Joe Perches
2013-07-30 1:30 ` Li Zefan
2013-07-30 1:58 ` Joe Perches
2013-07-30 2:06 ` Li Zefan
2013-07-30 2:36 ` Joe Perches
2013-07-30 3:04 ` Li Zefan
2013-07-30 3:10 ` Joe Perches
2013-07-30 3:25 ` Li Zefan [this message]
2013-07-30 18:17 ` [PATCH] checkpatch: Ignore #define TRACE_<foo> macros Joe Perches
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=51F73237.1010606@huawei.com \
--to=lizefan@huawei.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.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 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.