From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754679AbcBVLwh (ORCPT ); Mon, 22 Feb 2016 06:52:37 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:36995 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754609AbcBVLwg (ORCPT ); Mon, 22 Feb 2016 06:52:36 -0500 Date: Mon, 22 Feb 2016 12:52:27 +0100 From: Peter Zijlstra To: Thomas Gleixner 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 Message-ID: <20160222115227.GB6357@twins.programming.kicks-ass.net> References: <20160222110337.198341739@linutronix.de> <20160222110441.020475338@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160222110441.020475338@linutronix.de> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?