lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 09 Sep 2009 08:58:41 -0700
From:	Daniel Walker <dwalker@...o99.com>
To:	rostedt@...dmis.org
Cc:	Li Zefan <lizf@...fujitsu.com>, Ingo Molnar <mingo@...e.hu>,
	Frederic Weisbecker <fweisbec@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Eric Biederman <ebiederm@...ssion.com>
Subject: Re: [PATCH 2/2] tracing/events: Add kexec tracepoints

On Wed, 2009-09-09 at 11:19 -0400, Steven Rostedt wrote:
> On Wed, 2009-09-09 at 07:12 -0700, Daniel Walker wrote:
> > On Wed, 2009-09-09 at 07:46 -0400, Steven Rostedt wrote:
> > > On Tue, 2009-09-08 at 21:59 -0700, Daniel Walker wrote:
> > > > On Wed, 2009-09-09 at 09:26 +0800, Li Zefan wrote:
> > > > > Daniel Walker wrote:
> > > > > > On Wed, 2009-09-09 at 09:15 +0800, Li Zefan wrote:
> > > > > >> +       TP_STRUCT__entry(
> > > > > >> +               __string(       msg,    msg     )
> > > > > >> +       ),
> > > > > > 
> > > > > > Why the funny spacing here?
> > > > > > 
> > > > > 
> > > > > To make the code better-looking.
> > > > > 
> > > > > This is the coding-style we use for the code in
> > > > > include/trace/events/*.
> > > > 
> > > > It's part of Linux right? We already have a coding style ..
> > > 
> > > It's a special macro. What are you now, part of the style police?
> > 
> > I'm just like everyone else, someone who asks questions and makes
> > comments .. By using a different style than what the rest of Linux uses
> > your putting yourself at a disadvantage since you can't easily use
> > checkpatch on that code (even the stuff that is compliant) ..
> 
> I'm fine with questions, but yours sounded a bit more cynical

I'm never cynical (not on purpose anyway). I was just saying it like it
is .. 

> And here's that same code with normal Linux style:
> 
> TRACE_EVENT(sched_wait_task,
> 	TP_PROTO(struct rq *rq, struct task_struct *p),
> 	TP_ARGS(rq, p),
> 	TP_STRUCT__entry(__array(char, comm, TASK_COMM_LEN)
> 		__field(pid_t, pid)
> 		__field(int, prio)),
> 	TP_fast_assign(memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
> 		__entry->pid	= p->pid;
> 		__entry->prio	= p->prio;
> 	),
> 	TP_printk("task %s:%d [%d]",
> 		  __entry->comm, __entry->pid, __entry->prio));


The below is checkpatch clean ..

TRACE_EVENT(sched_wait_task,

        TP_PROTO(struct rq *rq, struct task_struct *p),

        TP_ARGS(rq, p),

        TP_STRUCT__entry(
                __array(char,   comm,   TASK_COMM_LEN)
                __field(pid_t,  pid)
                __field(int,    prio)
        ),

        TP_fast_assign(
                memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
                __entry->pid    = p->pid;
                __entry->prio   = p->prio;
        ),

        TP_printk("task %s:%d [%d]",
                  __entry->comm, __entry->pid, __entry->prio)
);


That's not radically different from what you currently have .. You could
still align the fields with tabs. You just have to remove the
starting/ending tabs..

Daniel

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ