Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753531AbdFVRzB (ORCPT ); Thu, 22 Jun 2017 13:55:01 -0400 Received: from foss.arm.com ([217.140.101.70]:42260 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753447AbdFVRyj (ORCPT ); Thu, 22 Jun 2017 13:54:39 -0400 Date: Thu, 22 Jun 2017 18:53:50 +0100 From: Mark Rutland To: Hoan Tran Cc: Will Deacon , Jonathan Corbet , Tai Nguyen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Loc Ho Subject: Re: [PATCH v3 2/3] perf: xgene: Move PMU leaf functions into function pointer structure Message-ID: <20170622175349.GE25967@leverpostej> References: <1496772146-11084-1-git-send-email-hotran@apm.com> <1496772146-11084-3-git-send-email-hotran@apm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1496772146-11084-3-git-send-email-hotran@apm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 808 Lines: 25 On Tue, Jun 06, 2017 at 11:02:25AM -0700, Hoan Tran wrote: > This patch moves PMU leaf functions into a function pointer structure. > It helps code maintain and expasion easier. > > Signed-off-by: Hoan Tran > --- > drivers/perf/xgene_pmu.c | 85 +++++++++++++++++++++++++++++++++++++----------- > 1 file changed, 66 insertions(+), 19 deletions(-) > -static inline u32 xgene_pmu_read_counter(struct xgene_pmu_dev *pmu_dev, int idx) > +static inline u64 xgene_pmu_read_counter32(struct xgene_pmu_dev *pmu_dev, > + int idx) > { > - return readl(pmu_dev->inf->csr + PMU_PMEVCNTR0 + (4 * idx)); > + return (u64)readl(pmu_dev->inf->csr + PMU_PMEVCNTR0 + (4 * idx)); > } Nit: the cast is redundant, and can go. Otherwise: Acked-by: Mark Rutland Thanks, Mark.