From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754859AbcBVMBy (ORCPT ); Mon, 22 Feb 2016 07:01:54 -0500 Received: from www.linutronix.de ([62.245.132.108]:33668 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754623AbcBVMBx (ORCPT ); Mon, 22 Feb 2016 07:01:53 -0500 Date: Mon, 22 Feb 2016 13:00:35 +0100 (CET) From: Thomas Gleixner To: Peter Zijlstra cc: LKML , x86@kernel.org, Borislav Petkov , Stephane Eranian , Harish Chegondi , Kan Liang , Andi Kleen , Jacob Pan Subject: Re: [patch V2 10/28] x86/perf/intel_uncore: Store box in event->pmu_private In-Reply-To: <20160222115227.GB6357@twins.programming.kicks-ass.net> Message-ID: References: <20160222110337.198341739@linutronix.de> <20160222110441.020475338@linutronix.de> <20160222115227.GB6357@twins.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Feb 2016, Peter Zijlstra wrote: > On Mon, Feb 22, 2016 at 11:06:50AM -0000, Thomas Gleixner wrote: > > + event->pmu_private = box; > > > +static inline struct intel_uncore_box *uncore_event_to_box(struct perf_event *event) > > +{ > > + return event->pmu_private; > > +} > > Do you really need this? That is, what is wrong with: > > static inline struct intel_uncore_box *uncore_event_to_box(struct perf_event *event) > { > return uncore_pmu_to_box(event->pmu, event->cpu); > } > > Which, after patch 12, should be fairly trivial, right? Yes.