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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 2 Nov 2009 14:01:51 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Paul Mackerras <paulus@...ba.org>
Cc:	Ingo Molnar <mingo@...e.hu>, LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	"K.Prasad" <prasad@...ux.vnet.ibm.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Mike Galbraith <efault@....de>,
	Paul Mundt <lethal@...ux-sh.org>
Subject: Re: [PATCH 3/6] perf/core: Add a callback to perf events

On Mon, Nov 02, 2009 at 02:49:32PM +1100, Paul Mackerras wrote:
> Frederic Weisbecker writes:
> 
> > @@ -4335,6 +4336,15 @@ perf_event_alloc(struct perf_event_attr *attr,
> >  
> >  	event->state		= PERF_EVENT_STATE_INACTIVE;
> >  
> > +	if (!callback) {
> > +		if (parent_event)
> > +			event->callback = parent_event->callback;
> > +		else
> > +			event->callback = NULL;
> > +	} else {
> > +		event->callback		= callback;
> > +	}
> 
> Wouldn't this be simpler and clearer as:
> 
> 	if (!callback && parent_event)
> 		callback = parent_event->callback;
> 	event->callback = callback;
> 
> ?
> 
> Paul.


Yep, I'm going to change that.
Thanks.

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