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] [thread-next>] [day] [month] [year] [list]
Message-ID: <19182.22220.389174.916544@cargo.ozlabs.ibm.com>
Date:	Mon, 2 Nov 2009 14:49:32 +1100
From:	Paul Mackerras <paulus@...ba.org>
To:	Frederic Weisbecker <fweisbec@...il.com>
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: [PATCH 3/6] perf/core: Add a callback to perf events

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